|
From: | Ryan Hall |
Subject: | Re: Restart with mmonit |
Date: | Mon, 30 Jun 2014 13:24:15 -0400 |
ubuntucheck 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 stopcheck process sshd with pidfile /var/run/sshd.pidstart 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 restartif 5 restarts within 5 cycles then timeoutCentOS 6check process apache with pidfile /var/run/httpd/httpd.pidstart program = "/etc/init.d/httpd start" with timeout 60 secondsstop program = "/etc/init.d/httpd stop"if cpu > 60% for 2 cycles then alertif cpu > 80% for 5 cycles then restartif totalmem > 200.0 MB for 5 cycles then restartif children > 250 then restartif loadavg(5min) greater than 10 for 8 cycles then stopcheck process sshd with pidfile /var/run/sshd.pidstart 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 restartif 5 restarts within 5 cycles then timeoutCentOS 5check process apache with pidfile /var/run/httpd.pidstart program = "/etc/init.d/httpd start" with timeout 60 secondsstop program = "/etc/init.d/httpd stop"if cpu > 60% for 2 cycles then alertif cpu > 80% for 5 cycles then restartif totalmem > 200.0 MB for 5 cycles then restartif children > 250 then restartif loadavg(5min) greater than 10 for 8 cycles then stopcheck process sshd with pidfile /var/run/sshd.pidstart 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 restartif 5 restarts within 5 cycles then timeoutOne 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:Can you share the relevant monit conf files?--
On 6/30/14 9:41 AM, Bruce MacKenzie wrote:
Hello. I’m testing on ubuntu and CentOS 5&6. On the ubuntu server everything works fine. Start, stop, restart from mmonit, On the server stopping the service prompts mmonit to start, restart on the server records a change in PID for apache, mysql and ssh. On CentOS everything works for ssh. The restart from mmonit for apache and mysql fails. For some reason the service actually does start but the PID isn’t recorded in the expected place. If I do a netstat the PID is listed. I kill it then have mmonit monitor and it restarts the service. Any ideas what I can look at? Thanks Bruce address@hidden -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
-- Paul Theodoropoulos www.anastrophe.com
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |