Service dependencies

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitw
Posts: 28
Joined: Tue Jun 28, 2016 8:07 am

Service dependencies

Post by amitw »

Hi,
I have 2 servers that holds 2 identical services (Act as a Cluster, Active Passive)
When service on server 1 is down, service on server 2 start working automatically.

I want to configure that the Service on Server 2 won't be monitored up-until the service on Server 1 is Down (Dont want to get False-Positive)

I dont know how to monitor this kind of behavior with Nagios.
Should i use Parent/Child? Dependencies ?

Will be glad to get an exapmle :-)

Thanks alot,
Amit
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Service dependencies

Post by lmiltchev »

You could probably use service dependencies. Here's an example:

Code: Select all

define servicedependency {
    host_name                       Server 1
    service_description             Service 1
    dependent_host_name             Server 2
    dependent_service_description   Service 2
    execution_failure_criteria      o
    notification_failure_criteria   o
}
In the example above, the dependent service (Service 2) won't be actively checked, and the notifications for it won't be sent out if the master service (Service 1) is in OK state.

Read more about service dependencies here: https://assets.nagios.com/downloads/nag ... ncies.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked