With the check_http Nagios plugin we can check that a url returns an OK status code as well as verifying the page contains a certain string of text. The usage format is a s follows…

/usr/local/nagios/libexec/check_http -H hostname -r search_string

For example…

/usr/local/nagios/libexec/check_http -H www.youdidwhatwithtsql.com -r "wordpress"

If you want to make the check case-insensitive then change to…

/usr/local/nagios/libexec/check_http -H www.youdidwhatwithtsql.com -R "wordpress"

Happy monitoring!