scheduling downtime from cron

Rob Blake rob.blake at gmail.com
Tue Mar 20 10:31:09 CET 2007


On 3/20/07, Tom Yates <madlists at teaparty.net> wrote:
>
> is there any way to schedule NAGIOS downtime from the shell?  we'd quite
> like to have a regular maintenance window for a service, and if we could
> arrange that from cron, our lives would be improved.
>
> thanks for any light anyone can shed.
>
>
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:

http://www.nagios.org/developerinfo/externalcommands/commandlist.php

I think the one most pertinent to what you are trying to achieve would be
SCHEDULE_SVC_DOWNTIME or maybe SCHEDULE_HOST_SVC_DOWNTIME.

cheers

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070320/d85149a7/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
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