Canceled Downtimes don't appear in the History

Hello :wave:

Prior to EventhistoryQuery returns never started downtimes events 路 Issue #5020 路 Icinga/icingaweb2 路 GitHub and icinga2web 2.12.0 the fixed downtimes which were canceled after they started were shown in the history.
The icinga2api doesn鈥檛 allow to update downtimes - but it would be really helpful to keep them in the history and to be able to remove them, if they don鈥檛 take as much time as expected to be notified about problems.

One solution i found was to create a new downtime with the current time as the end time鈥 But the icinga2web-history shows the actual_start_time as the start time (So the time the new downtime is created) - which is also kind of confusing.

Do you have any advice how we can end the downtimes 鈥渢he right way鈥, if we can麓t be certain of the exact endtime in advance?

I already created a issue on Github a few days ago:

Removing them via API isn鈥檛 a problem.

I use a distinct author if I set one via API so I can later filter by it.

curl -k -s -S -i -u root:icinga -H 'Accept: application/json' \
 -X POST 'https://localhost:5665/v1/actions/remove-downtime' \
 -d $'{
  "type": "Downtime",
  "filter": " == filterHost && !service && == filterAuthor",
  "filter_vars": {
    "filterHost": "icinga2-satellite1.localdomain",
    "filterAuthor": "icingaadmin"
  "pretty": true

Thanks for your response :slight_smile:

But my issue is not with not being able to remove the downtimes via the api - its about using this, the was_cancelled flag gets set in the Database, Which leads to the UI/Icingaweb2 filtering it out of the history:

So you want to see downtimes hat were ended before the endtime?


This used to be the behavior - but it was changed with the latest release.
So maybe there is a better way to end the downtimes, if they dont take as long as expected :slight_smile:

(I just created a PR to kind of revert the change which did that: )

1 Like