Alternate check interval when state become CRITICAL
Justin Pasher
justinp at newmediagateway.com
Tue Feb 10 00:57:26 CET 2009
Hello,
(I have included the applicable nagios definitions at the end of the email).
I'm trying to figure out if this is even possible. I am running Nagios
3.0.6 on Debian Etch. I have some service checks setup to see if a web
site is still reachable. The check itself is pretty simple. It inherits
most of the options from a service template (most were the default
settings out of the box).
Right now, the check happens every 5 minutes. If the check_http exceeds
the timeout, it changes to a CRITICAL state and the alert is sent. After
that, it continues to check every 5 minutes to see if the state changes.
If the state remains at CRITICAL or changes to OK, another notification
is sent out.
What I would like to do is have the check interval change to every one
minute when the state become CRITICAL, but keep the notifications at 5
minute intervals.
Here is an example of the preferred scenario (minute by minute) for a
service that is down for approximately three minutes.
12:00 - state checked, returns OK
12:05 - state checked, returns CRITICAL, email sent
12:06 - state checked, returns CRITICAL, no email sent
12:07 - state checked, returns CRITICAL, no email sent
12:08 - state checked, returns OK, email sent, resume normal check interval
12:13 - state checked, returns OK
I tried setting retry_interval to 1, but it doesn't seem to affect the
frequency of the checks after the state become CRITICAL. I think because
max_check_attempts is set to 1, it wouldn't work as I described anyway.
The "check scheduling" link in the docs seems to be the place that would
have the information I need
(http://nagios.sourceforge.net/docs/3_0/checkscheduling.html), but it's
under construction.
Is there something else I'm missing, or is this type of scenario not
possible? Thanks.
Justin Pasher
==============================
define service {
name nmg-service
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 5
is_volatile 0
check_period 24x7
normal_check_interval 5
retry_check_interval 1
max_check_attempts 1
notification_period 24x7
notification_options w,u,c,r
register 0
}
define service {
host_name myhost
service_description www.example.com
check_command check_http2!www.example.com!25!50
contact_groups admins,websites
use nmg-service
}
define command {
command_name check_http2
command_line /usr/lib/nagios/plugins/check_http -t 60 -f follow
-H '$ARG1$' -I '$HOSTADDRESS$' -w '$ARG2$' -c '$ARG3$'
}
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
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