I actually do all of this kind of work by
looking at the GUI. Meaning, I have the script get the appropriate page and
find the downtime id. This information may be in the
status.log. I also think there is a downtime.log. Check in there. You’d
have to parse the file. -Lori From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bruce Pennypacker I would like to write a
couple scripts to help automate maintainence tasks for a site we're using
Nagios to monitor. I was hoping to be able to write a couple of scripts
that would make use of SCHEDULE_HOST_DOWNTIME and DEL_HOST_DOWNTIME to do this.
In a nutshell, I want to be able to run one command that schedules a fixed
downtime for an arbitrary length of time specified by the user. This
could schedule downtime for anywhere from one host to all the hosts that Nagios
monitors. I was then hoping to be able to use DEL_HOST_DOWNTIME to clear those
downtimes when the maintence work was complete. The problem I'm having,
however, is that DEL_HOST_DOWNTIME requires the downtime ID, which I don't see
any way of obtaining from outside Nagios (short of looking it up in the
GUI). Is there a way I can clear a downtime entry for a host
without knowing the downtime ID (or alternately, some way of looking up that ID
via a remote command)? |