|
From: | Emil eMerchantPay |
Subject: | monit does not restart Apache correctly |
Date: | Mon, 1 Jul 2013 09:06:09 +0000 |
Hi,
I am using Monit 5.3.1 and have the following simple config:
check process apache with pidfile /var/run/apache2.pid
start program = "/etc/init.d/apache2 start" with timeout 60 seconds
stop program = "/etc/init.d/apache2 stop"
if failed port 80 proto http with timeout 10 seconds for 3 cycles then restart
if cpu usage > 95% for 3 cycles then restart
if 3 restarts within 3 cycles then timeout
depends on mysql
check process mysql with pidfile /var/run/mysqld/mysqld.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed port 3306 then restart
What I am trying to achieve is, test apache at port 80, and if it is not accessible, I restart it.
Problem is, I never see a restart msg in /var/log/apache2/error.log, so Apache is not restarted.
I am constantly getting emails with from Monit:
Monit restart apache at Sun, 16 Jun 2013 06:33:39 on some-host.some-domain: failed protocol test [HTTP] at INET[localhost:80] via TCP -- HTTP: Error receiving data -- Resource temporarily
unavailable
How can I restart Apache properly and make sure that after a few restarts, the service is unmonitored and I don't get more emails from Monit?
Thanks in advance
______________________________________________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this message in error please notify us immediately and please destroy this message without disclosing or copying its contents to anybody. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ________________________________________________________________ |
[Prev in Thread] | Current Thread | [Next in Thread] |