Reschedule service when check interval is changed.

Fixes #3681
This commit is contained in:
Gunnar Beutner 2013-02-11 16:11:11 +01:00
parent 72c4ef57d6
commit 8ab803aac0
1 changed files with 7 additions and 0 deletions

View File

@ -221,6 +221,13 @@ void Service::OnAttributeChanged(const String& name, const Value& oldValue)
Service::InvalidateCommentCache();
else if (name == "notifications")
UpdateSlaveNotifications();
else if (name == "check_interval") {
ConfigItem::Ptr item = ConfigItem::GetObject("Service", GetName());
/* update the next check timestamp if we're the owner of this service */
if (item && !IsAbstract())
UpdateNextCheck();
}
}
set<Host::Ptr> Service::GetParentHosts(void) const