]> granicus.if.org Git - icinga2/commitdiff
Reschedule service when check interval is changed.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Feb 2013 15:11:11 +0000 (16:11 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Feb 2013 15:11:11 +0000 (16:11 +0100)
Fixes #3681

lib/icinga/service.cpp

index 78bbb60002fb008cfe0d69d41b73027db024ffbc..ba3fa5ef5f98349b133243fd230db8eaea01801f 100644 (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