Icinga DB: introduce icinga:history:stream:downtime#scheduled_by

... with the Downtime#scheduled_by attribute.
This commit is contained in:
Alexander A. Klimov 2021-08-09 20:07:38 +02:00 committed by Noah Hilverling
parent afb2635e76
commit 2bb5ed0cb3

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);
}