Merge pull request #9080 from Icinga/feature/scheduled_by-2.13

Icinga DB: introduce icinga:history:stream:downtime#scheduled_by
This commit is contained in:
Noah Hilverling 2021-11-11 15:27:28 +01:00 committed by GitHub
commit bf46fc447f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1732,6 +1732,13 @@ void IcingaDB::SendStartedDowntime(const Downtime::Ptr& downtime)
xAdd.emplace_back(GetObjectIdentifier(parent));
}
auto scheduledBy (downtime->GetScheduledBy());
if (!scheduledBy.IsEmpty()) {
xAdd.emplace_back("scheduled_by");
xAdd.emplace_back(scheduledBy);
}
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
}
@ -1812,6 +1819,13 @@ void IcingaDB::SendRemovedDowntime(const Downtime::Ptr& downtime)
xAdd.emplace_back(GetObjectIdentifier(parent));
}
auto scheduledBy (downtime->GetScheduledBy());
if (!scheduledBy.IsEmpty()) {
xAdd.emplace_back("scheduled_by");
xAdd.emplace_back(scheduledBy);
}
m_Rcon->FireAndForgetQuery(std::move(xAdd), Prio::History);
}