non sticky passive checks
Paul Weaver
paul.weaver at bbc.co.uk
Fri Jan 8 12:12:45 CET 2010
We use the following check to ensure that a backup has completed. The
backup job calls in success (or fail) at the end, and runs every day
(86,400 seconds). The freshness_threshold
The backupFailed check command contains the folllowing. Note that
normally active checks are disabled, however the check_freshness and
freshness_threshold will triger an active check after n time intervals
(93,600 * 1second in my case).
This is nagios 2, so YMMV
define service{
use defaultservice
host_name myhost
service_description Nightly Backup
active_checks_enabled 0
passive_checks_enabled 1
check_freshness 1
freshness_threshold 93600
max_check_attempts 1
check_command backupFailed
}
define command{
command_name backupFailed
command_line $USER1$/reportError 2 "The backup on
$HOSTADDRESS$ failed to report in time"
}
With reportError being a bash script:
#!/bin/bash
echo $2
exit $1
--
What's with all the carrots? What do they need such good eyesight for
anyway?
Paul Weaver
Systems Development Engineer
BBC FM&T BETG TDD SDT
Work: 020 8225 8109
Mobile: 07736 481006
Room 1244, BBC Television Centre,
Wood Lane, London, W12 7RJ
________________________________
From: Pankaj [mailto:penguinhead at gmail.com]
Sent: 08 January 2010 07:30
To: Nagios Mailinglist
Subject: [Nagios-users] non sticky passive checks
Hi,
I've configured passive service checks and am reporting back the
results using nsca. I would like to turn the alerts to be critical after
5 minutes if the monitored servers fail to send any results. Currently
the check continues to remain in the last state. How can I achieve this?
>>>>>>>>>>> service_common.cfg
define service{
use generic_service
name passive_service
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 0
register 0
is_volatile 0
check_period 24x7
max_check_attempts 1
normal_check_interval 5
retry_check_interval 1
check_freshness 0
contact_groups admins
check_command check_dummy!0
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
stalking_options w,c,u
}
define service {
use passive_service
service_description HW Sensors
hostgroup_name hgp_webservers,
hgp_db, hgp_search, hgp_image
check_command check_dummy
active_checks_enabled 0
passive_checks_enabled 1
}
define command{
command_name check_dummy
command_line $USER1$/check_dummy $ARG1$
}
--
( 2b || ! 2b )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100108/e8e9ac5a/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
-------------- next part --------------
_______________________________________________
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