Nagios Host Check Behaviour

Erik Sejr eriks at ssimicro.com
Thu Jun 23 23:49:11 CEST 2011


Hi,
I have a question for the list regarding the behaviour of host checks in
Nagios. My understanding was that host checks only took place if a
service changed state, otherwise the state of the host was assumed based
on the state of the services that host provides.

We have a number of hosts, each with 1 or more passive services. Passive
service checks arrive every five minutes with a freshness threshold set
at 6 minutes. I am trying to get the behaviour described above - I only
want nagios to perform a host check if a service changes state (from up
to down). Otherwise, if all host services are OK I want nagios to assume
the host the services are running on is also OK.

I cannot seem to get it to do this, I can only get one extreme or the other:

1. Nagios checks the hosts, every 5 minutes regardless of the state of
the services. I have confirmed this though a TCP dump on the server. The
pings to the host go out (and come back) every 5 minutes.

OR

2. Nagios never checks the hosts and they all show as PENDING for ever
and ever.

If The host template is configured as follows I get scenario #1

define host{
name                           remote-host
hostgroups                     NBDC
register                       0
max_check_attempts             5
notification_interval          5
notification_period            24x7
notification_options           d,r
contact_groups                 regular_contacts
check_command                  check-host-alive
}

If The host template is configured as follows I get scenario #2

define host{
name                           remote-host
hostgroups                     NBDC
register                       0
max_check_attempts             5
notification_interval          5
notification_period            24x7
notification_options           d,r
contact_groups                 regular_contacts
}

The difference is the insertion or lack of the check_command.

Hosts are defined to use the template in a basic manner:

define host{
host_name                       rtr01
alias                           Router 01
address                         rtr01.domain.com
parents                         upstream-rtr01,upstream-rtr02
use                             remote-host
}

define host{
host_name                       dhcp1
alias                           DHCP Network Gateway
address                         dhcp1.domain.com
parents                         rtr01
use                             remote-host
}

Any thoughts? Am I missing something in the config?

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list