Are Services Dependent on Hosts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Are Services Dependent on Hosts

Post by mkeey »

We have several services defined to hosts. When there is a threshold violation, the services alert as desired. When a host is unavailable in the network the host alerts as desired. However, it appears that at times services alert when a host is unavailable. So, we end up getting service alerts and a host alert which are somewhat redundant and unwanted. Are/Should services be dependent on hosts and if so why are we getting these unwanted alerts. If they aren't... they should be! Then how can I remedy the situation?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Are Services Dependent on Hosts

Post by benjaminsmith »

Hi @mkeey,

You can use service dependency to limit unwanted notifications when a master host is down or unreachable. To setup these relationships go to Configure > CCM > Advanced > Service Dependencies.

Take a look at the following guide for more details:
https://support.nagios.com/kb/article/n ... s-505.html

All services are associated with a host in Nagios, and it's possible to disable checks when the host is down on a system basis in the main configuration file (/usr/local/nagios/etc/nagios.cfg) :

Code: Select all

host_down_disable_service_checks=1
Let us know you have further questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Are Services Dependent on Hosts

Post by mkeey »

Thank you! That is great information. I'm thinking going the CFG file update would be the best and easiest way to do this. However, I'm unsure where in the CFG file this should be placed. Noticed a few "headings"...
# MODIFIED
# NDOUtils module
# PNP settings - bulk mode with NCPD
# service performance data
# host performance data
# OBJECTS - UNMODIFIED
# STATIC OBJECT DEFINITIONS (THESE DON'T GET EXPORTED/IMPORTED BY NAGIOSQL)
# OBJECTS EXPORTED FROM NAGIOSQL
# GLOBAL EVENT HANDLERS
# UNMODIFIED

Where should I code the "host_down_disable_service_checks=1"??

Secondly, when we perform an upgrade of the XI, will this setting get overwritten?


Thanks,
Martin
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Are Services Dependent on Hosts

Post by scottwilkerson »

mkeey wrote:Where should I code the "host_down_disable_service_checks=1"??
It would get set in /usr/local/nagios/etc/nagios.cfg
mkeey wrote:Secondly, when we perform an upgrade of the XI, will this setting get overwritten?
No, we would never modify this setting on upgrade
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Are Services Dependent on Hosts

Post by mkeey »

I think we have a misunderstanding. I know the setting should be defined in the nagios.cfg file. My question is where in the CFG file should the parameter be coded? Can it be placed anywhere? At the beginning, ending, or after one of the # fields?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Are Services Dependent on Hosts

Post by scottwilkerson »

mkeey wrote:I think we have a misunderstanding. I know the setting should be defined in the nagios.cfg file. My question is where in the CFG file should the parameter be coded? Can it be placed anywhere? At the beginning, ending, or after one of the # fields?
It can be placed anywhere, however make sure you don't have another host_down_disable_service_checks in the file with different settings.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mkeey
Posts: 199
Joined: Mon Sep 25, 2017 11:13 am

Re: Are Services Dependent on Hosts

Post by mkeey »

Agreed. Performed the following check...

[nagios@mlwnag12]:[/usr/local/nagios/etc]# ls
cgi.cfg contacts.cfg hostescalations.cfg hosts nagios.cfg nrpe nrpe.cfg.save recurringdowntime.cfg servicedependencies.cfg servicegroups.cfg static
commands.cfg contacttemplates.cfg hostextinfo.cfg hosttemplates.cfg ndo2db.cfg nrpe.cfg nsca.cfg resource.cfg serviceescalations.cfg services timeperiods.cfg
contactgroups.cfg hostdependencies.cfg hostgroups.cfg import ndomod.cfg nrpe.cfg.rpmnew pnp send_nsca.cfg serviceextinfo.cfg servicetemplates.cfg

[nagios@mlwnag12]:[/usr/local/nagios/etc]# grep host_down_disable_service_checks nagios.cfg

[nagios@mlwnag12]:[/usr/local/nagios/etc]#
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Are Services Dependent on Hosts

Post by npolovenko »

@mkeey, What version of XI are you running? The following option became avaliable in Core 4.1.0 or XI 5.5 +
host_down_disable_service_checks
Please upgrade XI to the latest version:
https://assets.nagios.com/downloads/nag ... ctions.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jvaira
Posts: 59
Joined: Tue Dec 22, 2015 7:40 pm

Re: Are Services Dependent on Hosts

Post by jvaira »

Would setting host_down_disable_service_checks=1 affect a bpi for down hosts?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Are Services Dependent on Hosts

Post by npolovenko »

@jvaira, If you enable the option, the services will remain in whatever state they were in before the host went down. So if some services were in OK state they are going to stay in OK state until the host recovers. Versus if you don't have this option enabled all services will eventually go down(critical) because the host is down. This difference could probably affect the BPI group health but I'd recommend testing this out in your environment.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked