Hi guys,
Is there a way to automate the scheduled Downtime for hosts/services via API or other way? This would be great.
Thanks!
Automatic Schedule Downtime API or how?
-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: Automatic Schedule Downtime API or how?
Yes, this is definitely do-able. The video is a little old, but it shows you what you need to do:
https://www.youtube.com/watch?v=v1cgoMGaEbs
https://www.youtube.com/watch?v=v1cgoMGaEbs
Re: Automatic Schedule Downtime API or how?
There is yet another way if you don't need it on a recurring schedule. We use the method I am going to mention during an auto-clone process we have.
Look here http://old.nagios.org/developerinfo/ext ... ndlist.php
Then search for downtime and you can see all the different commands to use when scheduling downtimes. When our auto-clone process kicks off, in its script is to use the two commands: SCHEDULE_HOST_DOWNTIME and SCHEDULE_HOST_SVC_DOWNTIME to schedule a downtime for a host and all services on that host while it is being cloned.
Look here http://old.nagios.org/developerinfo/ext ... ndlist.php
Then search for downtime and you can see all the different commands to use when scheduling downtimes. When our auto-clone process kicks off, in its script is to use the two commands: SCHEDULE_HOST_DOWNTIME and SCHEDULE_HOST_SVC_DOWNTIME to schedule a downtime for a host and all services on that host while it is being cloned.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Automatic Schedule Downtime API or how?
Or you can use this script I made for Nagios Reactor => http://outsideit.net/naf-schedule-downtime/ You can use it in multiple ways and even target hostgroups, host or a service.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: Automatic Schedule Downtime API or how?
Great Guys! I will read all this and return feedback!
Cheers!
Cheers!
-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: Automatic Schedule Downtime API or how?
I thought Nagios Reactor was a component in nagios xi. So i need to run another server or instance with reactor? I will try to read about Reactor but have no idea about it.. Sounds cool!
Cheers
Cheers
Re: Automatic Schedule Downtime API or how?
Yup - it's a different product that we provide for free. It's quite powerful, as WillemDH has demonstrated plenty.
https://www.nagios.com/products/nagios-reactor/
https://www.nagios.com/products/nagios-reactor/
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Automatic Schedule Downtime API or how?
I also have some examples here using the command pipe:
http://sites.box293.com/nagios/guides/t ... e-and-cgis
http://sites.box293.com/nagios/guides/t ... e-and-cgis
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
agustin.roca
- Posts: 39
- Joined: Tue Apr 28, 2015 10:28 am
Re: Automatic Schedule Downtime API or how?
Yeps.. i read about Reactor.. looks good, but still couldnt see or read much so i couldnt quite understand what id does in full. The videos are not very clear.
I did it using the commands as Bandit suggested. Quite easy approach.
Thanks a lot guys!
Will try to look again about Rector as it sounds promissing. any link that is technical and explains usefulness and use cases is appreciated.
Cheers!
I did it using the commands as Bandit suggested. Quite easy approach.
Thanks a lot guys!
Will try to look again about Rector as it sounds promissing. any link that is technical and explains usefulness and use cases is appreciated.
Cheers!