Downtime, API field overwritten on Apply Configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Downtime, API field overwritten on Apply Configuration

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Downtime, API field overwritten on Apply Configuration

Post 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.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Downtime, API field overwritten on Apply Configuration

Post by mon-team »

Hello Benjamin,
ok, thanks for the clarification.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Downtime, API field overwritten on Apply Configuration

Post by scottwilkerson »

mon-team wrote:Hello Benjamin,
ok, thanks for the clarification.
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked