Revision [3808]

Last edited on 2010-08-25 01:14:54 by KenFong
Additions:
if totalmem > 90% for 2 cycles then restart
if loadavg(5min) > 20 for 2 cycles then restart
====Note====
Sometimes monit acts weird, like when it starts it doesn't start up all services. Or it starts and certain service are started in not monitored state. I haven't figured out that yet but running **monit validate all** and **monit monitor all** seems to be helpful in those situations.


Revision [2264]

Edited on 2009-04-03 06:36:24 by WikiAdmin
Additions:
protocol HTTP request / then restart
===Restart apache with monit===
This could be useful if apache (or most likely crappy php code) is not cleaning up
check process apache
with pidfile "/usr/local/apache/logs/httpd.pid"
start program = "/etc/init.d/httpd start" with timeout 60 seconds
stop program = "/etc/init.d/httpd stop"
if 2 restarts within 3 cycles then timeout
if totalmem > 100 Mb then alert
if children > 255 for 5 cycles then stop
if cpu usage > 95% for 3 cycles then restart
if failed port 80 protocol http then restart
group server
depends on httpd.conf, httpd.bin
Ref: http://mmonit.com/monit/documentation/monit.html#examples
Deletions:
protocol HTTP request / then restart


Revision [1239]

The oldest known version of this page was created on 2007-12-27 22:12:19 by WikiAdmin
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki