Recently one of our web servers got screwed up by accidentally disabling the PHP module.
As far as our Nagios was concerned everything was fine, because the main web page still gave back a nice 200 OK
To add insult to injury, the page that were served were unparsed PHP files, including all kinds of sensitive information such as database logins, file locations etc.
So, not good.
I came up with this check in
commands.cfg (note that there are separate checks for HTTP and HTTPS):
command_line /usr/lib/nagios/plugins/check_http -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ --invert-regex -r '^\s*<\?(php)?\s+'
command_line /usr/lib/nagios/plugins/check_http -I $HOSTADDRESS$ --ssl -H $ARG1$ -u $ARG2$ --invert-regex -r '^\s*<\?(php)?\s+'
Then use this check for pages on your web server that you know should parse PHP. The arguments are the vhost name, and the URL:
use generic-service ; Name of service template to use
service_description PHP parsing on www.tienhuis.nl