I just setup monit to monitor connection to a website over http by requesting a specific file and checking the content. It seems to work, when I delete the file I receive a notice that the server is down.... but if I put the file back I never receive a message saying that the server is backup... and then if I remove the file again I never receive a message saying that the server is down again unless I restart monit.
set daemon 120
set logfile syslog facility log_daemon
set mailserver localhost
# set eventqueue
# basedir /var/monit # set the base directory where events will be stored
# slots 100 # optionaly limit the queue size
# allow admin:monit
check system localhost
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if memory usage > 75% then alert
if cpu usage (user) > 70% then alert
if cpu usage (system) > 30% then alert
if cpu usage (wait) > 20% then alert
check process nginx with pidfile /opt/nginx/logs/nginx.pid
if failed url
and content != "" for 2 cycles
then alert
check process mysql with pidfile /var/run/mysqld/mysqld.pid
check process postgresql with pidfile /var/run/postgresql/8.4-main.pid