204 |
# set mail-format - Must be followed by a mail format list containing at |
# set mail-format - Must be followed by a mail format list containing at |
205 |
# least one of the keywords; from: subject: or message: |
# least one of the keywords; from: subject: or message: |
206 |
# |
# |
207 |
|
# set alert -- Specifies an global email address for notification if an |
208 |
|
# error occured on any service. This statement is optional. |
209 |
|
# More than one alert statement is allowed. |
210 |
|
# |
211 |
# set httpd port -- Must be followed by a portnumber for the monit http |
# set httpd port -- Must be followed by a portnumber for the monit http |
212 |
# server. |
# server. |
213 |
# |
# |
256 |
# # if the primary mail server fails |
# # if the primary mail server fails |
257 |
# set mail-format # Set a default mail from-address for |
# set mail-format # Set a default mail from-address for |
258 |
# { from: monit@foo.bar } # all alert messages emitted by monit |
# { from: monit@foo.bar } # all alert messages emitted by monit |
259 |
|
# set alert sysadm@foo.bar # Send alert to system admin on any event |
260 |
# set httpd port 2812 and # Make monit start it's web-server |
# set httpd port 2812 and # Make monit start it's web-server |
261 |
# use address localhost # and only accept connection from localhost |
# use address localhost # and only accept connection from localhost |
262 |
# allow localhost # allow localhost to connect to the server and |
# allow localhost # allow localhost to connect to the server and |
275 |
# if children > 250 then restart |
# if children > 250 then restart |
276 |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
277 |
# if 3 restarts within 5 cycles then timeout |
# if 3 restarts within 5 cycles then timeout |
|
# alert sysadm@foo.bar |
|
278 |
# group server |
# group server |
279 |
# |
# |
280 |
# |
# |
284 |
# if failed permission 755 then unmonitor |
# if failed permission 755 then unmonitor |
285 |
# if failed uid root then unmonitor |
# if failed uid root then unmonitor |
286 |
# if failed gid root then unmonitor |
# if failed gid root then unmonitor |
|
# alert sysadm@foo.bar |
|
287 |
# alert security@foo.bar on { |
# alert security@foo.bar on { |
288 |
# checksum, permission, uid, gid, unmonitor |
# checksum, permission, uid, gid, unmonitor |
289 |
# } with the mail-format { subject: Alarm! } |
# } with the mail-format { subject: Alarm! } |
295 |
# stop program = "/etc/init.d/sybase stop" |
# stop program = "/etc/init.d/sybase stop" |
296 |
# if failed port 4001 then restart |
# if failed port 4001 then restart |
297 |
# if 2 restarts within 3 cycles then timeout |
# if 2 restarts within 3 cycles then timeout |
|
# alert foo@bar |
|
298 |
# group server |
# group server |
299 |
# mode passive |
# mode passive |
300 |
# depends on datafs |
# depends on datafs |
310 |
# if space usage > 99% then stop |
# if space usage > 99% then stop |
311 |
# if inode usage > 80% then alert |
# if inode usage > 80% then alert |
312 |
# if inode usage > 99% then stop |
# if inode usage > 99% then stop |
|
# alert root@localhost |
|
313 |
# group server |
# group server |
314 |
# |
# |
315 |
# |
# |
319 |
# if failed gid disk then unmonitor |
# if failed gid disk then unmonitor |
320 |
# if space usage > 3 GB then alert |
# if space usage > 3 GB then alert |
321 |
# if inode usage > 30000 then alert |
# if inode usage > 30000 then alert |
|
# alert root@localhost |
|
322 |
# mode passive |
# mode passive |
323 |
# |
# |
324 |
# |
# |
328 |
# if failed gid data then alert |
# if failed gid data then alert |
329 |
# if size > 100 MB then alert |
# if size > 100 MB then alert |
330 |
# if timestamp > 15 minutes then alert |
# if timestamp > 15 minutes then alert |
|
# alert root@localhost |
|
331 |
# |
# |
332 |
# |
# |
333 |
# check directory bin with path /bin |
# check directory bin with path /bin |
334 |
# if failed permission 755 then unmonitor |
# if failed permission 755 then unmonitor |
335 |
# if failed uid 0 then unmonitor |
# if failed uid 0 then unmonitor |
336 |
# if failed gid 0 then unmonitor |
# if failed gid 0 then unmonitor |
|
# alert root@localhost |
|
337 |
# |
# |
338 |
# |
# |
339 |
# check host myserver with address 192.168.1.1 |
# check host myserver with address 192.168.1.1 |