Merge pull request #9896 from Icinga/provide-cancel_time-where-has_been_cancelled-may-be-1

Disallow triggering a cancelled downtime, but provide cancel_time in Icinga DB downtime history where has_been_cancelled may be 1
This commit is contained in:
Alexander Aleksandrovič Klimov 2023-12-20 10:03:09 +01:00 committed by GitHub
commit 6c03598678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1863,6 +1863,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"
});