Nagios service dependency help

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
aravindjangam123
Posts: 3
Joined: Tue Feb 27, 2018 2:32 pm

Nagios service dependency help

Post by aravindjangam123 »

Hi All

Can you please help me with seeting up service dependincies in Nagios

I created below service dependency.
It doesn't seem to be working as expected, I am still being notified about search-action on hostname1 when the dependent service blank-search on hostname2 is critical


sudo cat /usr/local/nagios/etc/objects/dependencies.cfg
define servicedependency{
host_name hostname1
service_description search-action
dependent_host_name hostname2
dependent_service_description blank-search
execution_failure_criteria n
notification_failure_criteria w,u,c
}

Below is where i definded service checks

cat /usr/local/nagios/etc/objects/websites.cfg
define service {
service_description blank-search
use generic-service
check_command check_http!-H hostname2 -u url -p 8080 -t 25 -w 20 -c 25
host_name hostname2

}

define service {
service_description search-action
use generic-service
check_command check_http!-H hostname1 -u url -p 8080 -t 25 -w 20 -c 25 -s "book results"
host_name hostname1
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios service dependency help

Post by scottwilkerson »

you have the hosts/services backwards
try this

Code: Select all

define servicedependency{
host_name hostname2
service_description blank-search
dependent_host_name hostname1
dependent_service_description search-action
execution_failure_criteria n
notification_failure_criteria w,u,c
}
hostname1/blank-search is dependent on hostname2/blank-search

https://assets.nagios.com/downloads/nag ... ncies.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
aravindjangam123
Posts: 3
Joined: Tue Feb 27, 2018 2:32 pm

Re: Nagios service dependency help

Post by aravindjangam123 »

Thank you
That did the trick :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios service dependency help

Post by scottwilkerson »

glad to be of assistance!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked