Am 13.07.2016 um 19:36 schrieb Marcos Di Pietro:
Thanks for the input Michael.  What would be the correct way of scheduling a 
downtime of unknown duration?

A maintenance window should never have an unknown duration imho but
that's nitpicking I know.

I’ve noticed that if the scheduled downtime is deleted from the api, the 
downtime history entry still exists.

A downtime which is expired is removed by the core itself and therefore
not visible anymore via API. The IDO history is still there since the
core doesn't read from it but just pushed inserts/updates to it. On the
read downtime end event it will certainly update the database row. But
not when someone manipulates the end time during runtime - that event
won't trigger any rescheduling of the downtime (and that is your real
problem).

I understand the requirement of extending an existing downtime window,
but that's currently not supported. Add a second overlapping downtime -
that's what I've seen from other environments.

Kind regards,
Michael


Regards,
Marcos

On Jul 13, 2016, at 1:08 PM, Michael Friedrich <[email protected]> 
wrote:

Am 13.07.2016 um 18:36 schrieb Marcos Di Pietro:
Hi,

I’m using the API to schedule downtimes of a unknown duration.  The
scheduled downtime start time is set to now and the scheduled downtime
end time is set to a year from now.  When the downtime is done, I call
the API to update the downtime object’s end time to the current
datetime. However, when I look in the IDO database, the
icinga_downtimehistory table doesn’t reflect the updated end time and
the entry gets removed from the icinga_scheduleddowntime table. Is
there a way of updating the downtime history records thru the API? I
depend on this data being correct to generate SLA reports.

Interesting idea. But that's not gonna work as such object change
attributes won't trigger any other events (neither event stream nor DB
IDO). In your case you obviously want to manipulate a wrongly scheduled
downtime. Delete and re-create it - or fake it inside your database
backend as you've done with Icinga 1.x.

Kind regards,
Michael


-- 
Michael Friedrich, DI (FH)
Senior Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** OSBConf 2016 - September - osbconf.org **
** OSMC 2016 - November - netways.de/osmc **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users



-- 
Michael Friedrich, DI (FH)
Senior Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** OSBConf 2016 - September - osbconf.org **
** OSMC 2016 - November - netways.de/osmc **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to