Hello all, I am managing a apache server with some vhost, I configured monit 
this way:

check process apache with pidfile /var/run/apache2.pid
   start program = "/etc/init.d/apache2 start"
   stop program  = "/etc/init.d/apache2 stop"
   if failed host domain1 port 80 protocol http and request "/monit/token" then 
alert
   if failed host domain2 port 80 protocol http and request "/monit/token" then 
alert
   if failed host domain3 port 80 protocol http and request "/monit/token" then 
alert
   if cpu is greater than 60% for 2 cycles then alert
   if cpu > 80% for 5 cycles then restart
   if totalmem > 500 MB for 5 cycles then restart
   if children > 250 then restart
   if loadavg(5min) greater than 10 for 8 cycles then stop
   if 3 restarts within 5 cycles then timeout

I have a "/monit/token" file on each site, and when some page is not accessible 
from the machine it sends a alert.

Is it possible to know if the error is 404 or 500?

Thanks and best regards.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to