# apache monitrc snippet
check process apache with pidfile /var/run/httpd.pid
	group servers
	group www
	group apache
	start program = "/sbin/service httpd start"
	stop program  = "/sbin/service httpd stop"
	if failed host localhost port 80 protocol http
		and request "/" then restart
	if cpu > 80% for 5 cycles then restart
	if children > 100 then restart
	if loadavg(5min) greater than 10 for 8 cycles then stop
	if 3 restarts within 5 cycles then timeout
	depend apache_lib
	depend apache_bin
	depend apache_ep
	
check file apache_lib with path /usr/lib/apache/libhttpd.so
	group apache
	include /etc/monitrc.d/templates/rootrc
	
check file apache_bin with path /usr/sbin/httpd
	group apache
	include /etc/monitrc.d/templates/rootbin
	
check file apache_ep with path /usr/lib/apache/libhttpd.ep
	group apache
	include /etc/monitrc.d/templates/rootbin
