245 |
# set httpd port 2812 and # Make monit start it's web-server |
# set httpd port 2812 and # Make monit start it's web-server |
246 |
# use address localhost # and only accept connection from localhost |
# use address localhost # and only accept connection from localhost |
247 |
# allow localhost # allow localhost to connect to the server and |
# allow localhost # allow localhost to connect to the server and |
248 |
# allow hauk:monit # user 'hauk' with password 'monit' |
# allow admin:monit # user 'admin' with password 'monit' |
249 |
# |
# |
250 |
# check process apache with pidfile /usr/local/apache/logs/httpd.pid |
# check process apache with pidfile /usr/local/apache/logs/httpd.pid |
251 |
# start program = "/etc/init.d/httpd start" |
# start program = "/etc/init.d/httpd start" |
256 |
# then restart |
# then restart |
257 |
# if cpu is greater than 60% for 2 cycles then alert |
# if cpu is greater than 60% for 2 cycles then alert |
258 |
# if cpu > 80% for 5 cycles then restart |
# if cpu > 80% for 5 cycles then restart |
259 |
# if mem > 100.0 MB for 5 cycles then stop |
# if totalmem > 200.0 MB for 5 cycles then restart |
260 |
|
# if children > 250 then restart |
261 |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
# if loadavg(5min) greater than 10 for 8 cycles then stop |
262 |
# if 3 restarts within 5 cycles then timeout |
# if 3 restarts within 5 cycles then timeout |
263 |
# alert sysadm@foo.bar |
# alert sysadm@foo.bar |