Page 1 of 1
Disable services when host down
Posted: Tue Mar 09, 2021 10:11 am
by coitop
Hello,
We have used host_down_disable_service_checks=1 for all services to go down when 1 device is down. The thing is, we have created a service of our own, a ping, which gives some metrics we need even if the device is down. Can we have 1 service getting metrics even if we have host_down_disable_service_checks=1 and the host is DOWN?
Kind Regards
Re: Disable services when host down
Posted: Wed Mar 10, 2021 11:43 am
by benjaminsmith
Hi,
Can we have 1 service getting metrics even if we have host_down_disable_service_checks=1 and the host is DOWN?
That would be a global setting in the main nagios configuration file. However, if wanted to work around it, you can setup a dummy host that is always up using the check_dummy plugin and then hardcode the IP address into the service command ( so it does inherit the ip from the dummy host). That way this service check would keep running if the actual host goes down.
Benjamin
Re: Disable services when host down
Posted: Thu Mar 11, 2021 2:34 am
by coitop
benjaminsmith wrote:Hi,
Can we have 1 service getting metrics even if we have host_down_disable_service_checks=1 and the host is DOWN?
That would be a global setting in the main nagios configuration file. However, if wanted to work around it, you can setup a dummy host that is always up using the check_dummy plugin and then hardcode the IP address into the service command ( so it does inherit the ip from the dummy host). That way this service check would keep running if the actual host goes down.
Benjamin
Hello Benjamin,
I tried that and inserted around 1000 free variables to 2 hosts pinging on local IP and Nagios didn't co-op very well with it to be honest (didn't even make it to creating all the different commands / services and Nagios started showing issues, no server issues like too much utilization of RAM or CPU, services stopped showing up on devices, etc.).
Re: Disable services when host down
Posted: Thu Mar 11, 2021 2:59 pm
by benjaminsmith
HI
@coitop,
When you say "Nagios didn't co-op very well with it", what type of errors are you getting ( check the /usr/local/nagios/var/nagios.log)? Did you get any errors on Apply Configuration?
Benjamin