1 ###############################################################################
3 ###############################################################################
4 set daemon 60 # check services at 30-second intervals
5 with start delay 120 # optional: delay the first check by 2-minutes
7 ## Set syslog logging with the 'daemon' facility. If the FACILITY option is
8 ## omitted, monit will use 'user' facility by default. If you want to log to
9 ## a stand alone log file instead, specify the path to a log file
11 #set logfile syslog facility log_daemon
12 set logfile "/var/log/monit.log"
13 set idfile /var/.monit.id
14 set statefile /var/.monit.state
15 set mailserver localhost
17 basedir /var/monit # set the base directory where events will be stored
18 slots 100 # optionaly limit the queue size
19 set alert admin@repo.or.cz
20 # set alert manager@foo.bar only on { timeout } # receive just service-
21 set httpd port 2812 and
23 ###############################################################################
25 ###############################################################################
27 if loadavg (1min) > 7 then alert
28 if loadavg (5min) > 5 then alert
29 if memory usage > 75% then alert
30 if cpu usage (user) > 70% then alert
31 if cpu usage (system) > 30% then alert
32 if cpu usage (wait) > 20% then alert
34 check filesystem rootfs with path /dev/md0
35 if space usage > 80% for 5 times within 15 cycles then alert
36 if space usage > 98% then stop
37 if inode usage > 98% then stop
40 include /etc/monit/conf.d/*