diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index a774f077778..8996c87d8e2 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -399,8 +399,8 @@ void Downtime::RemoveDowntime(const String& id, bool includeChildren, bool cance if (downtime->IsExpired()) { reason = "expired at " + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", downtime->GetEndTime()); - } else if (cancelled && !removedBy.IsEmpty()) { - reason = "cancelled by user '" + removedBy + "'"; + } else if (cancelled && (!removedBy.IsEmpty() || !config_owner.IsEmpty())) { + reason = "cancelled by " + (!removedBy.IsEmpty() ? "user '" + removedBy : "'" + config_owner) + "'"; } else { reason = force ? "cancelled forcibly" : ""; } diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp index 2ad9fa80de9..61c99dc1209 100644 --- a/lib/icinga/scheduleddowntime.cpp +++ b/lib/icinga/scheduleddowntime.cpp @@ -323,7 +323,7 @@ void ScheduledDowntime::RemoveObsoleteDowntimes() auto configOwnerHash (downtime->GetConfigOwnerHash()); if (!configOwnerHash.IsEmpty() && configOwnerHash != downtimeOptionsHash) - Downtime::RemoveDowntime(downtime->GetName(), false, true); + Downtime::RemoveDowntime(downtime->GetName(), false, true, true); } } }