Checking that a website returns a given string
In this recipe, we'll build on the basic web service monitoring established in the recipe Monitoring web services in this chapter and learn how to create a command that uses the
check_http plugin to ensure that a particular string is included as part of an HTTP response.
By default, there's no Nagios Core command defined to use the plugin in this way, so the recipe will include defining a command before using it as part of a service check.
This may be necessary if we're monitoring a website on a server that may not necessarily return a
404 Not Found or similar error that will flag a
CRITICAL in Nagios; rather than merely checking if a document was found, we can check whether it matches a ...