mirror of https://github.com/Icinga/icinga2.git
Icinga DB: no active checks? Not overdue!
This commit is contained in:
parent
8b516f0c08
commit
9c567c0bde
|
@ -289,7 +289,7 @@ void IcingaDB::UpdateAllConfigObjects()
|
|||
|
||||
auto checkable (dynamic_pointer_cast<Checkable>(object));
|
||||
|
||||
if (checkable) {
|
||||
if (checkable && checkable->GetEnableActiveChecks()) {
|
||||
auto zAdds (dynamic_pointer_cast<Service>(checkable) ? &serviceZAdds : &hostZAdds);
|
||||
|
||||
zAdds->emplace_back(Convert::ToString(checkable->GetNextUpdate()));
|
||||
|
@ -1995,6 +1995,7 @@ void IcingaDB::SendNextUpdate(const Checkable::Ptr& checkable)
|
|||
if (!m_Rcon || !m_Rcon->IsConnected())
|
||||
return;
|
||||
|
||||
if (checkable->GetEnableActiveChecks()) {
|
||||
m_Rcon->FireAndForgetQuery(
|
||||
{
|
||||
"ZADD",
|
||||
|
@ -2004,6 +2005,16 @@ void IcingaDB::SendNextUpdate(const Checkable::Ptr& checkable)
|
|||
},
|
||||
Prio::CheckResult
|
||||
);
|
||||
} else {
|
||||
m_Rcon->FireAndForgetQuery(
|
||||
{
|
||||
"ZREM",
|
||||
dynamic_pointer_cast<Service>(checkable) ? "icinga:nextupdate:service" : "icinga:nextupdate:host",
|
||||
GetObjectIdentifier(checkable)
|
||||
},
|
||||
Prio::CheckResult
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void IcingaDB::SendAcknowledgementSet(const Checkable::Ptr& checkable, const String& author, const String& comment, AcknowledgementType type, bool persistent, double changeTime, double expiry)
|
||||
|
|
Loading…
Reference in New Issue