Monitor specific website with Monit

How to: monitor the health of a remote web address with Monit.

Most of the examples of Monit checking a web address' health is for localhost and in connection with checking the apache process. However, in case you want to monitor remote addresses, you'll need this:

check host domain.com with address domain.com every 6 cycles
    if failed port 80 protocol http for 5 cycles then alert
    alert your.email@provider.com { connection, timeout } with mail-format {
        from: monit@your-server.com
        subject: $EVENT at $DATE on $HOST
        message: domain.com is unreachable from your-server.com server
    }

(Oh, by the way: this entry was written by Peter Molnar, and originally posted on petermolnar dot net.)