Establishing a service dependency
In this recipe, we'll learn how to establish a service dependency between two services. This feature can be used to control how Nagios Core checks services and notifies us about problems in situations where if one service is in a PROBLEM
state, it implies that at least one other service is necessarily also in a PROBLEM
state.
Getting ready
You will need a Nagios Core 3.0 or newer server, and have shell access to change its backend configuration. You will also need to have at least two services defined, one of which is by definition dependent on the other; this means that if the dependency service were to enter CRITICAL
state, then it would imply that the dependent service would also be CRITICAL
.
We'll use a simple example: suppose we are testing authentication to a mail server marathon.naginet
with a service MAIL_LOGIN
, and also checking a database service MAIL_DB
on the same host, which stores the login usernames and password hashes.
In this situation, it might...