Scheduled Downtime Cancel

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
charlie126
Posts: 13
Joined: Mon Oct 01, 2018 7:55 am

Scheduled Downtime Cancel

Post by charlie126 »

Hi,

Is it possible to cancel/delete scheduled downtime in bulk rather then having to delete them individually from the downtime option on the Nagios webportal?

Kind regards,
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Scheduled Downtime Cancel

Post by mcapra »

You could probably script something out using the external commands file and JSON CGIs:
https://assets.nagios.com/downloads/nag ... ernalcmds/
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/

Else, there's a few related feature requests you may want to chime in on:
https://github.com/NagiosEnterprises/na ... issues/338
https://github.com/NagiosEnterprises/na ... issues/279
Former Nagios employee
https://www.mcapra.com/
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Scheduled Downtime Cancel

Post by npolovenko »

@charlie126, I was able to remove all downtime by deleting hostcomment and hostdowntime blocks (for host downtime), and servicecomment and servicedowntime blocks for the service downtime from the /usr/local/nagios/var/retention.dat file.
So you'd stop the nagios process, make changes to the retention.dat file and then start the nagios process. To take this one step further you could come up with a script that would strip the retention file from these blocks automatically.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked