easy, create a test service:
define service{
use generic-service
host_name localhost
service_description Notification Check
check_command check-host-alive
active_checks_enabled 0 ; Active service checks are disabled
max_check_attempts 1 ; only take one submission to page
notification_interval 5
}
[EMAIL PROTECTED] ~]# cat /etc/cron.d/nagios-checker
20 8 * * 5 root /root/nagios-checker /dev/null
[EMAIL PROTECTED] ~]# cat /root/nagios-checker
###
# #
# This script will generate a passive service failure then recovery. #
# It is designed to be regularly triggered to ensure that Nagios #
# Notifications are still happening. #
# #
###
#!/bin/bash
echo [`date +%s`] PROCESS_SERVICE_CHECK_RESULT;localhost;Notification
Check;2;Notification check started /var/log/nagios/rw/nagios.cmd
sleep 80
echo [`date +%s`] PROCESS_SERVICE_CHECK_RESULT;localhost;Notification
Check;0;Notification check started /var/log/nagios/rw/nagios.cmd
Christopher Hunt
ReachONE Internet, Inc.
(360)456-5640
http://www.reachone.com
Christopher Hunt wrote:
How can i tell who's REALLY on-call when using the rotation feature?
I'm running nagios 3.0.3 and appreciating the timeperiod.cfg rotation
feature. I have 3 techs on call and we rotate weekly. All 3 techs are
part on the on-call contact-group. So part of my timeperiods.cfg looks
like this:
define timeperiod{
timeperiod_name bob-oncall
alias Bob Is On-Call
2008-06-27 / 21 00:00-07:30,17:30-24:00 ; Friday - every 21 days
2008-06-28 / 21 00:00-24:00 ; Saturday
2008-06-29 / 21 00:00-24:00 ; Sunday
2008-06-30 / 21 00:00-07:30,17:30-24:00 ; Monday
2008-07-01 / 21 00:00-07:30,17:30-24:00 ; Tuesday
2008-07-02 / 21 00:00-07:30,17:30-24:00 ; Wednesday
2008-07-03 / 21 00:00-07:30,17:30-24:00 ; Thursday
}
define timeperiod{
timeperiod_name doug-oncall
alias Doug Is On-call
2008-07-04 / 21 00:00-07:30,17:30-24:00 ; Friday - every 21 days
2008-07-05 / 21 00:00-24:00 ; Saturday
2008-07-06 / 21 00:00-24:00 ; Sunday
2008-07-07 / 21 00:00-07:30,17:30-24:00 ; Monday
2008-07-08 / 21 00:00-07:30,17:30-24:00 ; Tuesday
2008-07-09 / 21 00:00-07:30,17:30-24:00 ; Wednesday
2008-07-10 / 21 00:00-07:30,17:30-24:00 ; Thursday
}
define timeperiod{
alias McKenzie Is On-call
timeperiod_name mckenzie-oncall
2008-07-11 / 21 00:00-07:30,17:30-24:00 ; Friday - every 21 days
2008-07-12 / 21 00:00-24:00 ; Saturday
2008-07-13 / 21 00:00-24:00 ; Sunday
2008-07-14 / 21 00:00-07:30,17:30-24:00 ; Monday
2008-07-15 / 21 00:00-07:30,17:30-24:00 ; Tuesday
2008-07-16 / 21 00:00-07:30,17:30-24:00 ; Wednesday
2008-07-17 / 21 00:00-07:30,17:30-24:00 ; Thursday
}
I know, according to my paper calendar, who should theoretically be on
call but as the dates in the config get farther in the past it gets
harder to see who might be on call on a given day. Is there any way,
either through bash script, forced page or some other method, to get
nagios to tell me which contact it would use?
Thanks
-Chris
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Nagios-users mailing list
Nagios-users@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
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url