Page 1 of 1

Downtime, API field overwritten on Apply Configuration

Posted: Thu Oct 24, 2019 10:01 am
by mon-team
Dear All,
i'm using this API to retrieve information about service scheduled downtime:

/v1/objects/downtime

Some of the fields you get back are the following:

"entry_time": "2019-10-24 14:44:45" --> when you submit the request
"scheduled_start_time": "2019-10-24 14:44:31" --> when you want the DT to start
"scheduled_end_time": "2019-10-24 15:44:31" --> when you want the DT to stop
"actual_start_time": "2019-10-24 14:45:36" --> when Nagios really puts the service in DT


Unfortunately, (as i cannot see any logic behind this behavior), i see that the field 'actual_start_time' gets overwritten each time an 'Apply Configuration' is run, with the Apply configuration datetime.
If you want to reproduce the behavior:
* take a service and schedule a datetime
* let the DT begin you will see the 'actual_start_time' field with a datetime near to the 'scheduled_start_time' value
* do an 'Apply Configuration'
* now the 'actual_start_time' will have the datetime of your latest Apply Configuration

What do you think about? (nagios Xi 5.6.1 version)
regards
Franz

Re: Downtime, API field overwritten on Apply Configuration

Posted: Thu Oct 24, 2019 1:07 pm
by benjaminsmith
Hi Franz,

I confirmed this with our dev team and this is expected behavior -- although not obvious at first glance. When you apply configuration, Nagios Core is stopped ( stopping the downtime event) and re-started ( starting scheduled downtime event), and as a result this value is updated. The actual_start_time indicates the lastest downtime start event from the Nagios logs.
downtime.png
Let me know if you have any questions.

Re: Downtime, API field overwritten on Apply Configuration

Posted: Fri Oct 25, 2019 2:24 am
by mon-team
Hello Benjamin,
ok, thanks for the clarification.

Re: Downtime, API field overwritten on Apply Configuration

Posted: Fri Oct 25, 2019 8:43 am
by scottwilkerson
mon-team wrote:Hello Benjamin,
ok, thanks for the clarification.
Locking thread