<br><br><div><span class="gmail_quote">On 3/20/07, <b class="gmail_sendername">Tom Yates</b> <<a href="mailto:madlists@teaparty.net">madlists@teaparty.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
is there any way to schedule NAGIOS downtime from the shell? we'd quite<br>like to have a regular maintenance window for a service, and if we could<br>arrange that from cron, our lives would be improved.<br><br>thanks for any light anyone can shed.
<br><br></blockquote></div><br>Yep, you want to make use of the external command file in Nagios. With the external command file there are numerous commands that you can submit into Nagios from external sources (hence the name). You could simply put together a small shell script that submits the command to enable downtime on a host at the beginning of your scheduled downtime, and then when everything is finished have cron submit another command to re-enabled the host/service. For a full list of the commands that you can submit visit this page:
<br><br><a href="http://www.nagios.org/developerinfo/externalcommands/commandlist.php">http://www.nagios.org/developerinfo/externalcommands/commandlist.php</a><br><br>I think the one most pertinent to what you are trying to achieve would be SCHEDULE_SVC_DOWNTIME or maybe SCHEDULE_HOST_SVC_DOWNTIME.
<br><br>cheers<br><br>Rob<br>