max_check_attempts, retry_check_interval, and notifications: confusion
prosolutions at gmx.net
prosolutions at gmx.net
Tue Mar 7 01:52:25 CET 2006
> >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:
normal_check_interval - how often to normally check when all OK
warning_check_interval - how often to check when WARNING
critical_check_interval - how often to check when CRITICAL
number_of_warnings_notification - after how many WARNING checks to send
notification
number_of_critical_notification - after how many CRITICAL checks to
send notification
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 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?
-------------------------------------------------------
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&kid=110944&bid=241720&dat=121642
_______________________________________________
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