mirror of https://github.com/Icinga/icinga2.git
IcingaDB: update icinga:nextupdate:* on Checkable#next_check changes
refs #7707
This commit is contained in:
parent
77e02031f9
commit
c6ea9bc7fe
|
@ -101,6 +101,9 @@ void IcingaDB::ConfigStaticInitialize()
|
||||||
Checkable::OnNewCheckResult.connect([](const Checkable::Ptr& checkable, const CheckResult::Ptr&, const MessageOrigin::Ptr&) {
|
Checkable::OnNewCheckResult.connect([](const Checkable::Ptr& checkable, const CheckResult::Ptr&, const MessageOrigin::Ptr&) {
|
||||||
IcingaDB::NewCheckResultHandler(checkable);
|
IcingaDB::NewCheckResultHandler(checkable);
|
||||||
});
|
});
|
||||||
|
Checkable::OnNextCheckChanged.connect([](const Checkable::Ptr& checkable, const Value&) {
|
||||||
|
IcingaDB::NextCheckChangedHandler(checkable);
|
||||||
|
});
|
||||||
|
|
||||||
Service::OnHostProblemChanged.connect([](const Service::Ptr& service, const CheckResult::Ptr&, const MessageOrigin::Ptr&) {
|
Service::OnHostProblemChanged.connect([](const Service::Ptr& service, const CheckResult::Ptr&, const MessageOrigin::Ptr&) {
|
||||||
IcingaDB::StateChangeHandler(service);
|
IcingaDB::StateChangeHandler(service);
|
||||||
|
@ -2042,6 +2045,13 @@ void IcingaDB::NewCheckResultHandler(const Checkable::Ptr& checkable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IcingaDB::NextCheckChangedHandler(const Checkable::Ptr& checkable)
|
||||||
|
{
|
||||||
|
for (auto& rw : ConfigType::GetObjectsByType<IcingaDB>()) {
|
||||||
|
rw->m_WorkQueue.Enqueue([rw, checkable]() { rw->SendNextUpdate(checkable); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct AuthorComment
|
struct AuthorComment
|
||||||
{
|
{
|
||||||
String Author;
|
String Author;
|
||||||
|
|
|
@ -108,6 +108,7 @@ private:
|
||||||
static void CommentRemovedHandler(const Comment::Ptr& comment);
|
static void CommentRemovedHandler(const Comment::Ptr& comment);
|
||||||
static void FlappingChangeHandler(const Checkable::Ptr& checkable, double changeTime);
|
static void FlappingChangeHandler(const Checkable::Ptr& checkable, double changeTime);
|
||||||
static void NewCheckResultHandler(const Checkable::Ptr& checkable);
|
static void NewCheckResultHandler(const Checkable::Ptr& checkable);
|
||||||
|
static void NextCheckChangedHandler(const Checkable::Ptr& checkable);
|
||||||
static void AcknowledgementSetHandler(const Checkable::Ptr& checkable, const String& author, const String& comment, AcknowledgementType type, bool persistent, double changeTime, double expiry);
|
static void AcknowledgementSetHandler(const Checkable::Ptr& checkable, const String& author, const String& comment, AcknowledgementType type, bool persistent, double changeTime, double expiry);
|
||||||
static void AcknowledgementClearedHandler(const Checkable::Ptr& checkable, const String& removedBy, double changeTime);
|
static void AcknowledgementClearedHandler(const Checkable::Ptr& checkable, const String& removedBy, double changeTime);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue