Skip to content

Commit

Permalink
Icinga DB downtime history: provide cancel_time where has_been_cancel…
Browse files Browse the repository at this point in the history
…led may be 1

The table sla_history_downtime requires a downtime_end.
The Go daemon takes the cancel_time if has_been_cancelled is 1.
So we must supply a cancel_time whereever has_been_cancelled is 1.
Otherwise the Go daemon can't process some entries.
  • Loading branch information
Al2Klimov committed Nov 8, 2023
1 parent 76b460c commit 9aaa990
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/icingadb/icingadb-objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
"scheduled_end_time", Convert::ToString(TimestampToMilliseconds(downtime->GetEndTime())),
"has_been_cancelled", Convert::ToString((unsigned short)downtime->GetWasCancelled()),
"trigger_time", Convert::ToString(TimestampToMilliseconds(downtime->GetTriggerTime())),
"cancel_time", Convert::ToString(TimestampToMilliseconds(downtime->GetRemoveTime())),
"event_id", CalcEventID("downtime_start", downtime),
"event_type", "downtime_start"
});
Expand Down

0 comments on commit 9aaa990

Please sign in to comment.