I would like to monitor empty replies from my apache2 process as I am running into a problem similar to "Apache gives empty reply" .
I am using monit to monitor my processes, so I am going to stick with that!
I have the file 'apache2' in my '/etc/monit/conf.d' directory on debian:
check process apache2 with pidfile /var/run/apache2/apache2.pid
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if children > 25 then restart
if failed host example.com port 80 protocol http # example.com replaces the actual site in this example.
# and request "/" # ??? Needed
# and size <10 # ??? such an option does not exist?
# with size <10 # ??? such an option does not exist?
with timeout 20 seconds
then restart
group server
If tried to add a size constraint, but I did not succeed. Is it possible to check for the size of the reply, if so, how to amend the above configuration?
Note: this monit is checking port 80 - SSL is ensured by a proxy, port 80 is not publicly accessible. The hosts file of the server has "example.com" point to the local IP.