|
From: | Bruce MacKenzie |
Subject: | Re: Restart with mmonit |
Date: | Mon, 30 Jun 2014 10:10:20 -0700 |
ubuntu check process apache with pidfile /run/apache2.pid
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program = "/etc/init.d/apache2 stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if totalmem > 200.0 MB for 5 cycles then restart
if children > 250 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/ssh start" stop program "/etc/init.d/ssh stop" if failed host 127.0.0.1 port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout CentOS 6 check process apache with pidfile /var/run/httpd/httpd.pid start program = "/etc/init.d/httpd start" with timeout 60 seconds stop program = "/etc/init.d/httpd stop" if cpu > 60% for 2 cycles then alert if cpu > 80% for 5 cycles then restart if totalmem > 200.0 MB for 5 cycles then restart if children > 250 then restart if loadavg(5min) greater than 10 for 8 cycles then stop check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/sshd start" stop program "/etc/init.d/sshd stop" if failed host 127.0.0.1 port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout CentOS 5 check process apache with pidfile /var/run/httpd.pid start program = "/etc/init.d/httpd start" with timeout 60 seconds stop program = "/etc/init.d/httpd stop" if cpu > 60% for 2 cycles then alert if cpu > 80% for 5 cycles then restart if totalmem > 200.0 MB for 5 cycles then restart if children > 250 then restart if loadavg(5min) greater than 10 for 8 cycles then stop check process sshd with pidfile /var/run/sshd.pid start program "/etc/init.d/sshd start" stop program "/etc/init.d/sshd stop" if failed host 127.0.0.1 port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout One thing I’ve noticed because I’ll watch on the server as mmonit does it’s thing. When it works correctly the PID doesn’t go away the number just changes. On the process’ that fail the PID disappears from the place it should be. On Jun 30, 2014, at 9:57 AM, Paul Theodoropoulos <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |