Hi all
I hope this is not an FAQ or something. I have looked but do not see this anywhere.
I would like to set a host to a "scheduled down time" state from a script. I am working on automating patching and often forget to do this step which can annoy my coworkers. Is there anyway to do this? I am writing my script in bash but I can also do perl or python. We are using Nagios version 3.0.3 currently. Thanks for your help.
Peace,
Lois
--
Lois Bennett, MSEE
Senior System Administrator
Channing Laboratory
Brigham & Women's Hospital
A Teaching Affiliate of
Harvard Medical School and
Harvard School of Public Health
Schedule downtime for a host from a commandline/script
Schedule downtime for a host from a commandline/script
Last edited by lois54 on Mon Dec 03, 2012 2:43 pm, edited 1 time in total.
Re: Schedule downtime for a host from a commandline/script
You can use whatever language you want, but here is an example in bash: http://old.nagios.org/developerinfo/ext ... and_id=119
Hopefully that helps
Hopefully that helps
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Schedule downtime for a host from a commandline/script
Jsmurphy has a great answer, and there are also other great examples such as this one:
http://exchange.nagios.org/directory/Ad ... er/details
And here is a link to the Nagios Exchange page on Scheduled Downtime:
http://exchange.nagios.org/directory/Ad ... d-Downtime
http://exchange.nagios.org/directory/Ad ... er/details
And here is a link to the Nagios Exchange page on Scheduled Downtime:
http://exchange.nagios.org/directory/Ad ... d-Downtime
Re: Schedule downtime for a host from a commandline/script
Thanks everyone. I am happy that this was so straight forward.
Peace,
Lois
Peace,
Lois
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Schedule downtime for a host from a commandline/script
Glad to see we had a solution for you, thanks for confirming!