mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8830 from Icinga/feature/idb-passive-overdue
Icinga DB: no active checks? Not overdue!
This commit is contained in:
commit
ef73136076
|
@ -285,7 +285,7 @@ void IcingaDB::UpdateAllConfigObjects()
|
||||||
|
|
||||||
auto checkable (dynamic_pointer_cast<Checkable>(object));
|
auto checkable (dynamic_pointer_cast<Checkable>(object));
|
||||||
|
|
||||||
if (checkable) {
|
if (checkable && checkable->GetEnableActiveChecks()) {
|
||||||
auto zAdds (dynamic_pointer_cast<Service>(checkable) ? &serviceZAdds : &hostZAdds);
|
auto zAdds (dynamic_pointer_cast<Service>(checkable) ? &serviceZAdds : &hostZAdds);
|
||||||
|
|
||||||
zAdds->emplace_back(Convert::ToString(checkable->GetNextUpdate()));
|
zAdds->emplace_back(Convert::ToString(checkable->GetNextUpdate()));
|
||||||
|
@ -2005,6 +2005,7 @@ void IcingaDB::SendNextUpdate(const Checkable::Ptr& checkable)
|
||||||
if (!m_Rcon || !m_Rcon->IsConnected())
|
if (!m_Rcon || !m_Rcon->IsConnected())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (checkable->GetEnableActiveChecks()) {
|
||||||
m_Rcon->FireAndForgetQuery(
|
m_Rcon->FireAndForgetQuery(
|
||||||
{
|
{
|
||||||
"ZADD",
|
"ZADD",
|
||||||
|
@ -2014,6 +2015,16 @@ void IcingaDB::SendNextUpdate(const Checkable::Ptr& checkable)
|
||||||
},
|
},
|
||||||
Prio::CheckResult
|
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)
|
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