]> granicus.if.org Git - icinga2/commitdiff
Schedule a host downtime for command SCHEDULE_HOST_SVC_DOWNTIME
authorMichael Friedrich <michael.friedrich@gmail.com>
Wed, 4 Feb 2015 20:19:47 +0000 (21:19 +0100)
committerMichael Friedrich <michael.friedrich@gmail.com>
Wed, 4 Feb 2015 20:19:47 +0000 (21:19 +0100)
fixes #8299

lib/icinga/externalcommandprocessor.cpp

index 8308e58a240a25a72f06952c264ad35656ecb416..4a01ff15a895f8ada736aac3f766a0fba4dbe6e0 100644 (file)
@@ -1079,6 +1079,13 @@ void ExternalCommandProcessor::ScheduleHostSvcDowntime(double, const std::vector
        if (triggeredByLegacy != 0)
                triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
 
+       Log(LogNotice, "ExternalCommandProcessor")
+           << "Creating downtime for host " << host->GetName();
+
+       (void) host->AddDowntime(arguments[6], arguments[7],
+           Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
+           Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
+
        BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
                Log(LogNotice, "ExternalCommandProcessor")
                    << "Creating downtime for service " << service->GetName();