Everyday scheduled downtime

Sam Terburg - Luna.nl Sam at Luna.nl
Tue Aug 3 11:03:48 CEST 2004


i did the following:

in /etc/crontab:
00 6    * * *   nagios  /usr/local/bin/schedule_downtime hostname
servicename "tomorrow 01:00" 3600

/usr/local/bin/schedule_downtime:
now=`date +%s`
host="$1"
service="$2"
from=`date --date="$3" +%s`
duration=$4
till=$(($from+$duration))

echo "[$now]
SCHEDULE_SVC_DOWNTIME;$host;$service;$from;$till;1;$duration;Cron;automatic
downtime scheduled from cron" >>/var/run/nagios/nagios.cmd


Greetings,

Sam Terburg
Luna.nl


Martin Mielke wrote:
> Hi all,
>
> I can't find the right options to tell Nagios not to check a host on a
> known period of time because the system is rebooted everyday at a
> certain time (please don't ask me why... our customer wants this). So,
> how would I tell Nagios not to perform system/service checks on a host
> everyday at 05:00 AM? Because now it's generating false-positives and
> sending a lot of "down / recovery" emails...
>
>
> Thanks and regards,
> Martin
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes
> on Linux.com, ITManagersJournal and NewsForge in the past few weeks?
> Now, one more big change to announce. We are now OSTG- Open Source
> Technology Group. Come see the changes on the new OSTG site.
> www.ostg.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



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.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