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
}
Nagios service dependency help
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios service dependency help
you have the hosts/services backwards
try this
hostname1/blank-search is dependent on hostname2/blank-search
https://assets.nagios.com/downloads/nag ... ncies.html
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
}https://assets.nagios.com/downloads/nag ... ncies.html
-
aravindjangam123
- Posts: 3
- Joined: Tue Feb 27, 2018 2:32 pm
Re: Nagios service dependency help
Thank you
That did the trick
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
glad to be of assistance!