servicedependency not working properly

Paul M Dubuc work at paul.dubuc.org
Fri Sep 2 19:10:00 CEST 2011


Steve Glasser wrote:
> Hi list,
>
> We often have nagios checks time out when servers are under heavy load.  One check tests nrpe, if that fails or times out I want notifications for other services on the same host to be suppressed.  To do this I am using servicedepenency.
>
> Looking at nagios logs I can see that all other checks, both nrpe and remote, are running before test_nrpe.  That means, at least for the first cycle of failed checks, that notifications for all services will be sent.
>
> Is it possible to control the order in which nagios checks run?  Or am I just doing something wrong?  Please see sample config below:
>
> define servicedependency {
>          host_name       vm-foo2
>          service_description     test_nrpe
>          dependent_host_name     vm-foo2
>          dependent_service_description   nrpe_check_load,nrpe_check_ntp_time,nrpe_check_root,nrpe_check_swap,nrpe_check_ro_mounts
>          notification_failure_criteria   c,u
>          execution_failure_criteria      n
> }
>
> Thanks,

I think the problem is that you have 'n' set for the 
execution_failure_criteria.  That means the dependent services will 
always be checked.  Try setting this to 'c,u' instead (same as 
notification_failure_critera)

 From the documentation: 
http://nagios.sourceforge.net/docs/nagioscore/3/en/objectdefinitions.html#servicedependency

> execution_failure_criteria: 	This directive is used to specify the
> criteria that determine when the dependent service should not be
> actively checked. If the master service is in one of the failure
> states we specify, the dependent service will not be actively
> checked. Valid options are a combination of one or more of the
> following (multiple options are separated with commas): o = fail on
> an OK state, w = fail on a WARNING state, u = fail on an UNKNOWN
> state, c = fail on a CRITICAL state, and p = fail on a pending state
> (e.g. the service has not yet been checked). >>>> If you specify n (none)
> as an option, the execution dependency will never fail and checks of
> the dependent service will always be actively checked (if other
> conditions allow for it to be).<<<< Example: If you specify o,c,u in this
> field, the dependent service will not be actively checked if the
> master service is in either an OK, a CRITICAL, or an UNKNOWN state.


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
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