I'm using monit 5.4 with debian wheezy in local network and the following config:
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 port 80 protocol http then restart
if cpu is greater than 30% for 1 cycles then alert
if cpu > 30% for 2 cycles then restart
if totalmem > 250 MB for 3 cycles then restart
if children > 200 then restart
if loadavg(5min) greater than 10 for 4 cycles then restart
if 3 restarts within 5 cycles then timeout
i show the cpu is over 30%
but the rules about cpu never restart the apache process
for test trafic i've a wordpress on this server and use a command like this: