Monitoring web services
In this recipe, we'll set up a service check to monitor the responsiveness of an HTTP and HTTPS server. We'll use the check_http
command and the plugin of the same name provided in the Nagios Plugins set to make HTTP and HTTPS requests of a web server, to ensure that it returns an appropriate and timely response. This is useful in situations where it's required to check whether a website is still functioning, particularly if there are times when it comes under heavy load or suffers denial of service attacks.
Getting ready
You should have a Nagios Core 3.0 or newer server with at least one host configured already. We'll use the example of sparta.naginet
, a host defined in its own file. You should also understand the basics ...
Get Nagios Core Administration Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.