mirror of https://github.com/Icinga/icinga2.git
RedisWriter: add icinga:history:stream:*#endpoint_id
This commit is contained in:
parent
8613365f1c
commit
4a7a8cb6f8
|
@ -1205,6 +1205,13 @@ void RedisWriter::SendStatusUpdate(const ConfigObject::Ptr& object, const CheckR
|
|||
xAdd.emplace_back(GetObjectIdentifier(checkable));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1246,6 +1253,13 @@ void RedisWriter::SendSentNotification(
|
|||
xAdd.emplace_back(GetObjectIdentifier(checkable));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1306,6 +1320,13 @@ void RedisWriter::SendAddedDowntime(const Downtime::Ptr& downtime)
|
|||
xAdd.emplace_back(Convert::ToString(TimestampToMilliseconds(downtime->GetTriggerTime() + downtime->GetDuration())));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1368,6 +1389,13 @@ void RedisWriter::SendStartedDowntime(const Downtime::Ptr& downtime)
|
|||
xAdd.emplace_back(Convert::ToString(TimestampToMilliseconds(downtime->GetTriggerTime() + downtime->GetDuration())));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1429,6 +1457,13 @@ void RedisWriter::SendRemovedDowntime(const Downtime::Ptr& downtime)
|
|||
xAdd.emplace_back(Convert::ToString(TimestampToMilliseconds(downtime->GetTriggerTime() + downtime->GetDuration())));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1466,6 +1501,13 @@ void RedisWriter::SendAddedComment(const Comment::Ptr& comment)
|
|||
xAdd.emplace_back(GetObjectIdentifier(checkable));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1504,6 +1546,13 @@ void RedisWriter::SendRemovedComment(const Comment::Ptr& comment)
|
|||
xAdd.emplace_back(GetObjectIdentifier(checkable));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
@ -1539,6 +1588,13 @@ void RedisWriter::SendFlappingChanged(const Checkable::Ptr& checkable, const Val
|
|||
xAdd.emplace_back(GetObjectIdentifier(checkable));
|
||||
}
|
||||
|
||||
auto endpoint (Endpoint::GetLocalEndpoint());
|
||||
|
||||
if (endpoint) {
|
||||
xAdd.emplace_back("endpoint_id");
|
||||
xAdd.emplace_back(GetObjectIdentifier(endpoint));
|
||||
}
|
||||
|
||||
m_Rcon->FireAndForgetQuery(std::move(xAdd));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue