max_check_attempts, retry_check_interval, and notifications: confusion

Marc Powell marc at ena.com
Tue Mar 7 03:15:36 CET 2006



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of prosolutions at gmx.net
> Sent: Monday, March 06, 2006 6:52 PM
> To: rouilj at ieee.org
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] max_check_attempts, retry_check_interval,
and
> notifications: confusion
> 
> > >I am trying to configure the following behavior from nagios:
> > >1. check a service every normal_check_interval
> > >2. if service check fails, up the check rate to
retry_check_interval
> > >3. if 2 successive service checks fail, send notification
> > >4. continue to check at retry_check_interval until service check
> > >   succeeds and send notification
> >
> > Yup 4 is the tough one.
> >
> 
> ...
> 
> > For nagios 2.x you can use the adaptive monitoring (see manual)
> > command: 'CHANGE_NORMAL_SVC_CHECK_INTERVAL:interval' to change the
> > interval from an event handler. I would suggest using the
> > objects.cache file to determine the configured normal_check_interval
> > and retry_check_interval. You may have to cache that info for your
> > event handler as I am not sure if that file is re-written when the
> > intervals change.
> >
> 
> Thanks for your help.  Too bad nagios doesn't simply have object
> configuration file options such as:
> 

[chop]

> at any rate the external command CHANGE_NORMAL_SVC_CHECK_INTERVAL does
> seem to almost do what I want with one small problem: Service event
> handlers recieve the following 3 macros: $SERVICESTATE$,
> $SERVICESTATETYPE$, $SERVICEATTEMPT$, yet in order to run

In the _examples_, sure, but you're not limited to those three at all.
There are many macros available to event handlers.

> CHANGE_NORMAL_SVC_CHECK_INTERVAL via an external command/event handler
I
> need to provide the following to it:
> 
> CHANGE_NORMAL_SVC_CHECK_INTERVAL;host1;service1;15\n" $now >
$commandfile
> 
> unfortunately $host$ is not provided to the external command via the
> event handler.  I'm not sure how to tell my external command for what
> host it should be changing the normal_check_interval.  How is the
> external command supposed to know which host triggered its event
> handler?

By passing it the $HOSTNAME$.

http://nagios.sourceforge.net/docs/2_0/macros.html

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
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