Scheduling Service Downtime
Ned Hanks
ndhanks at geneva.com
Thu Sep 9 19:23:47 CEST 2004
I have a script to schedule service downtime, but it is not getting
scheduled. The script is modified from a host downtime script posted a few
weeks ago. That script works fine.
I scheduled downtime from the cgi. The event log entries from the script
and cgi are identical but no entries from the script is in download.log. I
have looked at the source, and everything looks correct.
Here is the the script:
#!/bin/bash
set -x
USER1=/usr/nagios
now=$(date +%s)
host=$1
svc=$2
from=$(date --date="$3" +%s)
duration=$4
till=$(($from+$duration))
fixed=0
if [ ! -z "$5" ]
then
fixed=$5
fi
echo "[$now]
SCHEDULE_SVC_DOWNTIME;$host;$svc:$from;$till;$fixed;$duration;NagiosCron;Sch
eduled" >> $USER1/var/rw/nagios.cmd
--------------------------------------
Ned D Hanks
IT Manager
Geneva Steel, LLC
10 South Geneva Rd
Vineyard, UT 84058
Office: 801-227-9182
Fax: 801-227-9400
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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