Monitoring individual nodes in a cluster
In this recipe, you'll learn how to monitor a collection of hosts in a cluster using the check_cluster
plugin included in the Nagios Plugins standard. Being able to monitor more than one host collectively is useful in situations with redundancy; one of a set of hosts being in the DOWN
state, perhaps for power conservation or maintenance reasons, is not necessarily a cause for notification. However, if a larger number or all of the hosts were down, we would definitely want to be notified. Using check_cluster
allows us to arrange this.
Getting ready
You will need Nagios Core 4.0 or a newer server and to have shell access to change its backend configuration. You will also need to have at least two monitored hosts in a redundant setup for some function, such as database replication, nameservers, or load-balanced web servers.
You should also be familiar with the way hosts and services are defined, writing commands in particular; these concepts are discussed...