[monit] Monit to monitor http process, not response code
From:
Chanchal James
Subject:
[monit] Monit to monitor http process, not response code
Date:
Wed, 14 May 2008 11:03:32 -0500
Hi,
How can I have monit monitor http process without checking the http response code.
Monit restarts http when index file is missing, because it throws 403 error. I would like it to restart http only when http process isnt running and probably report by mail if response code is an error(403, 500, 404 etc).
My config is:
check process apache with pidfile /usr/local/apache/logs/httpd.pid start program = "/etc/init.d/httpd start" stop program = "/etc/init.d/httpd stop" if failed host 127.0.0.1 port 80 protocol http
then restart if failed host 127.0.0.1 port 443 type tcpssl protocol http then restart if 5 restarts within 5 cycles then timeout group server