Page 1 of 1

Service dependencies

Posted: Mon Jul 03, 2017 12:53 am
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

Re: Service dependencies

Posted: Wed Jul 05, 2017 12:15 pm
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