239 |
# set logfile syslog facility log_daemon # Set syslog logging |
# set logfile syslog facility log_daemon # Set syslog logging |
240 |
# # (facility LOG_DAEMON) |
# # (facility LOG_DAEMON) |
241 |
# set mailserver localhost # Use localhost as the smtp server |
# set mailserver localhost # Use localhost as the smtp server |
242 |
# set mail-format # Set a default mail from address for |
# set mail-format # Set a default mail from-address for |
243 |
# { from: monit@foo.bar } # all alert messages emitted by monit |
# { from: monit@foo.bar } # all alert messages emitted by monit |
244 |
# set httpd port 2812 and # Make monit start it's web-server |
# set httpd port 2812 and # Make monit start it's web-server |
245 |
# use address localhost # and only accept connection from localhost |
# use address localhost # and only accept connection from localhost |
254 |
# if failed port 443 type tcpssl proto http with timeout 15 seconds |
# if failed port 443 type tcpssl proto http with timeout 15 seconds |
255 |
# then restart |
# then restart |
256 |
# if cpu is greater than 60% for 2 cycles then alert |
# if cpu is greater than 60% for 2 cycles then alert |
257 |
# if cpu > 80% for 5 cycles restart |
# if cpu > 80% for 5 cycles then restart |
258 |
# if mem > 100.0 MB for 5 cycles then stop |
# if mem > 100.0 MB for 5 cycles then stop |
259 |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
260 |
# if 3 restarts within 5 cycles then timeout |
# if 3 restarts within 5 cycles then timeout |
261 |
# alert sysadm@foo.bar |
# alert sysadm@foo.bar |
262 |
# group server |
# group server |
|
# depends on apache_bin |
|
263 |
# |
# |
264 |
# |
# |
265 |
# check file apache_bin with path /usr/local/apache/bin/httpd |
# check file apache_bin with path /usr/local/apache/bin/httpd |
266 |
# if failed checksum and |
# if failed checksum and |
267 |
# expect the sum 8f7f419955cefa0b33a2ba316cba3659 then stop |
# expect the sum 8f7f419955cefa0b33a2ba316cba3659 then alert |
268 |
# if failed permission 755 then stop |
# if failed permission 755 then alert |
|
# if failed uid root then stop |
|
|
# if failed gid root then stop |
|
|
# if size changed then stop |
|
|
# if timestamp changed then stop |
|
269 |
# alert sysadm@foo.bar |
# alert sysadm@foo.bar |
270 |
# alert security@foo.bar on { |
# alert security@foo.bar on { |
271 |
# checksum, permission, size, timestamp, uid, gid |
# checksum, permission |
272 |
# } with the mail-format { subject: Alarm! } |
# } with the mail-format { subject: Alarm! } |
273 |
# group server |
# group server |
274 |
# |
# |