Page 2 of 4
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:06 am
by rkane
OK, updated Nagios to the latest version. Also set the service "max checks" to 6 while leaving the "max checks" for hosts at 5
I'm still getting a string of service notifications before I get my "host down" notification. My impression is that the moment the host goes into "re check mode" (it's down but has not fired a notification) that the services on that host would stop checking all together until the host goes back to an "up" state.
What am I missing?
scottwilkerson wrote:rkane wrote:Good to know - appreciate it!
scottwilkerson wrote:There were a few bugs in versions prior to 5.5.3 that could be related to this as well causing additional unexpected notifications.
No problem
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:14 am
by jforcier
The service check should still run but they shouldn't send notifications while the host is down.
You can stop the service check if a host is down with this:
Define in /usr/local/nagios/etc/nagios.cfg
Code: Select all
host_down_disable_service_checks=1
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:30 am
by rkane
Agreed....but they still are.
Any thoughts as to why that might be happening?
jforcier wrote:The service check should still run but they shouldn't send notifications while the host is down.
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:35 am
by scottwilkerson
Can you share the config for one of the services that is sending notifications while the host is down?
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:39 am
by rkane
Absolutely - is there a good way to do that other than screen shots?
Guessing I can pull the config files off the machine...where do the service config / templates live?
EDIT: found the service config and host config files, here they are:
Code: Select all
###############################################################################
#
# Services configuration file
#
# Created by: Nagios CCM 2.7.0
# Date: 2018-09-19 11:21:27
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
service_description CPU Usage
use xiwizard_ncpa_service
hostgroup_name Servers_Windows
check_command check_xi_ncpa!-t 'nagiosXI' -P 5693 -M cpu/percent -w 50 -c 80 -q 'aggregate=avg'!!!!!!!
_xiwizard ncpa
register 1
}
###############################################################################
#
# Services configuration file
#
# END OF FILE
#
###############################################################################
Code: Select all
###############################################################################
#
# Hosts configuration file
#
# Created by: Nagios CCM 2.7.0
# Date: 2018-09-19 11:21:27
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define host {
host_name CONF-11106
use xiwizard_windowsserver_host_CONF
address CONF-11106
parents uts-core-a
icon_image win_server.png
statusmap_image win_server.png
_xiwizard windowsdesktop
register 1
}
###############################################################################
#
# Hosts configuration file
#
# END OF FILE
#
###############################################################################
These are both pointed at a set of templates so finding those to post is likely key
scottwilkerson wrote:Can you share the config for one of the services that is sending notifications while the host is down?
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 11:57 am
by jforcier
...where do the service config / templates live?
They are located in:
You can also view service templates by going to the CCM > Templates > Service Templates, and clicking on the
View Config button on the right hand side.
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 4:35 pm
by npolovenko
@rkane, I'd like to take a look at your service template -> xiwizard_ncpa_service and the host template -> xiwizard_windowsserver_host_CONF.
Or you can just upload the /usr/local/nagios/var/objects.cache file.
If the host was still in the soft state, the "host_down_disable_service_checks" option would not work.
Re: Service dependent on host?
Posted: Wed Sep 19, 2018 6:14 pm
by rkane
Some files attached for ya
RE the soft state - if the host goes soft down, rechecks 5 times @ 1 minute each and then goes hard down. And the services recheck 6 times @ 1 minute each....how would the service be 'hard down' (ie - time to notify) two full minutes before the host?
npolovenko wrote:@rkane, I'd like to take a look at your service template -> xiwizard_ncpa_service and the host template -> xiwizard_windowsserver_host_CONF.
Or you can just upload the /usr/local/nagios/var/objects.cache file.
If the host was still in the soft state, the "host_down_disable_service_checks" option would not work.
Re: Service dependent on host?
Posted: Thu Sep 20, 2018 1:02 pm
by npolovenko
@rkane, Based on the notification settings the host should be in a hard state 1 minute before its services. And because of the option in the nagios.cfg service checks should not send any notifications.
host_down_disable_service_checks=1
Have you restarted nagios after adding that option?
Can you run the state history and notification reports for a)the host that went down and b)one of its services that kept alerting?
That way we could actually make sure that the host was indeed in a hard state when Nagios sent out service notifications.
Re: Service dependent on host?
Posted: Thu Sep 20, 2018 1:23 pm
by rkane
Agreed on the notifications and how they should work....that's why it's baffling to me that the services are notifying over two minutes BEFORE the host. I did not change or add that disable option, assume that's an out of the box setting? Will restart Nagios anyway to be safe.
Report set attached - notice the services are sending alerts first and are alerting on Attempt 1/5 rather than 5/5?
npolovenko wrote:@rkane, Based on the notification settings the host should be in a hard state 1 minute before its services. And because of the option in the nagios.cfg service checks should not send any notifications.
host_down_disable_service_checks=1
Have you restarted nagios after adding that option?
Can you run the state history and notification reports for a)the host that went down and b)one of its services that kept alerting?
That way we could actually make sure that the host was indeed in a hard state when Nagios sent out service notifications.