From 9aaa9901bddeca9ee8907f6219fa7542d4d386a3 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 8 Nov 2023 15:22:39 +0100 Subject: [PATCH] Icinga DB downtime history: provide cancel_time where has_been_cancelled 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. --- lib/icingadb/icingadb-objects.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 8b129e4e841..e9b277fcf0f 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -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" });