As part of the Chaosdorf Admin Team, I recently wrote (and today overhauled) check_websites. You give it a URL and it checks if it is reachable under certain constraints.
All of this can also be achieved with check_http
. However, since the Icinga
configuration format is extremely verbose, I prefere to configure just one
service which then uses check_websites to do all of this in one run.
Right now, it does actually not support that much. To quote its help:
-a, --auth=STRING
Verify that URL requires auth (HTTP 401)
-o, --ok=STRING
Verify that URL exists (HTTP 200)
-r, --redirect="FROM TO"
Verify that FROM is a redirect (HTTP 301) to TO
In our case, we're calling it the following way:
/usr/local/lib/nagios/plugins/check_websites
--extra-opts=@/etc/nagios/chaosdorf_websites.ini
On a side note: Nagios::Plugin is really, really awesome.