Are Services Dependent on Hosts
Are Services Dependent on Hosts
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
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) :
Let us know you have further questions.
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
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Are Services Dependent on Hosts
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
# 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
It would get set in /usr/local/nagios/etc/nagios.cfgmkeey wrote:Where should I code the "host_down_disable_service_checks=1"??
No, we would never modify this setting on upgrademkeey wrote:Secondly, when we perform an upgrade of the XI, will this setting get overwritten?
Re: Are Services Dependent on Hosts
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
It can be placed anywhere, however make sure you don't have another host_down_disable_service_checks in the file with different settings.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?
Re: Are Services Dependent on Hosts
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]#
[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
@mkeey, What version of XI are you running? The following option became avaliable in Core 4.1.0 or XI 5.5 +
https://assets.nagios.com/downloads/nag ... ctions.pdf
Please upgrade XI to the latest version:host_down_disable_service_checks
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.
Re: Are Services Dependent on Hosts
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
@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.