Page 1 of 1

schedule downtime in the past

Posted: Tue Mar 28, 2017 8:48 am
by smoren
Hello,

is there any way to schedule downtime in the past? I'd like to be able to schedule downtime on 'Schedule Downtime' page and enter both Start and End time in the past. When I try to do it, it seems nagios planned it, but nothing is entered into database...

Reason for this is that we provide some reports to management about availability of services. But sometimes, when we have a planned downtime for particular service, responsible persons forget to enter it in advance into nagios as scheduled downtime. And just because of this, availability of services is not as good as it should be.

Thanks.

Re: schedule downtime in the past

Posted: Tue Mar 28, 2017 10:35 am
by avandemore
No, it is not possible to schedule downtime in the past.

Availability reports are generated based upon data in log files in the directories /usr/local/nagios/var/ and /usr/local/nagios/var/archives/.

Re: schedule downtime in the past

Posted: Tue Mar 28, 2017 3:08 pm
by smoren
This is not the answer I was hoping for :), nevertheless expected.

As far as I know, you consider to change the way how availability is calculated to the one based on data in database. Do you think this behavior (or feature, if you like) could then be possible?
Thanks.

Re: schedule downtime in the past

Posted: Tue Mar 28, 2017 3:17 pm
by avandemore
Actually the state changes are also calculated from the same places. You can find the logic for it here:

https://github.com/NagiosEnterprises/na ... gi/avail.c

I think the way this is currently stored is under evaluation, so what you are requesting may be easier to do in the future. Presently the only way of doing this would be to alter the log files.