Thanks Daniel - on demand checks was exactly what I was looking for. Regards, Erik
On 06/23/2011 05:20 PM, Daniel Tuecks wrote: > Hello, > > sounds like you want 'on demand host checks'. > > "Regularly scheduled host checks are optional. If you set the > check_interval option in your host definition to zero (0), Nagios will > not perform checks of the hosts on a regular basis. It will, however, > still perform on-demand checks of the host as needed for other parts > of the monitoring logic. > > On-demand checks are made when a service associated with the host > changes state because Nagios needs to know whether the host has also > changed state. Services that change state are often an indicator that > the host may have also changed state. For example, if Nagios detects > that the HTTP service associated with a host just changed from a > CRITICAL to an OK state, it may indicate that the host just recovered > from a reboot and is now back up and running. " > > This is quoted from the official Nagios Documenation: > http://nagios.sourceforge.net/docs/3_0/hostchecks.html > > > Regards > Daniel > > 2011/6/23 Erik Sejr <[email protected]>: >> 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 >> [email protected] >> 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 >> > > ------------------------------------------------------------------------------ > 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 > [email protected] > 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 > ------------------------------------------------------------------------------ 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 [email protected] 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
