I use a simple script in crontab which in turn invokes another script made by Sam Tilders.
Example of crontab script:
---------------------------------------------------------------
[EMAIL PROTECTED] bin]$ crontab -l
00 00 * * * /usr/local/nagios/bin/sched_downtime
[EMAIL PROTECTED] bin]$ more sched_downtime
#!/bin/sh
#Today variable
tday=`date +%a`
/usr/local/nagios/bin/down_time XXX "`date --iso-8601` 23:30:00" "`date
--iso-8601` 23:59:59" 1 3600 nagios "scheduled downtime"
/usr/local/nagios/bin/down_time XXX "`date --iso-8601` 00:00:30" "`date
--iso-8601` 01:00:00" 1 3600 nagios "scheduled downtime"
/usr/local/nagios/bin/down_time YYY "`date --iso-8601` 01:38:00" "`date
--iso-8601` 06:30:00" 1 3600 nagios "scheduled downtime"
if [ "$tday" = "Fri" ]; then
/usr/local/nagios/bin/down_time ZZZ "`date +%F` 06:55:00" "`date
+%F` 07:15:00" 1 3600 nagios "Scheduled reboot time"
fi
[EMAIL PROTECTED] bin]$
---------------------------------------------------------------
Ive attached the script made by Sam as down_time
Also make sure that external command is enabled in config and that the
proper permissions is set on nagios/var/rw/nagios.cmd
Hope this helps
/Ulf
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthias
Eichler
Sent: den 3 april 2006 13:09
To: [email protected]
Subject: [Nagios-users] Scheduling downtimes with external command?
Dear List,
maybe I am just blind, but I cant find any documented
external command for scheduling downtimes from an external
application.
Has anybody experiences with this?
Thanks,
Matthias Eichler
-------------------------------------------------------
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
[email protected]
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
down_time
Description: Binary data
