MCPcopy Create free account
hub / github.com/Icinga/icinga2 / DelaySvcNotification

Method DelaySvcNotification

lib/icinga/externalcommandprocessor.cpp:1472–1485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1470}
1471
1472void ExternalCommandProcessor::DelaySvcNotification(double, const std::vector<String>& arguments)
1473{
1474 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1475
1476 if (!service)
1477 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delay service notification for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1478
1479 Log(LogNotice, "ExternalCommandProcessor")
1480 << "Delaying notifications for service " << service->GetName();
1481
1482 for (const Notification::Ptr& notification : service->GetNotifications()) {
1483 notification->SetNextNotification(Convert::ToDouble(arguments[2]));
1484 }
1485}
1486
1487void ExternalCommandProcessor::EnableHostNotifications(double, const std::vector<String>& arguments)
1488{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
GetNameMethod · 0.45
GetNotificationsMethod · 0.45

Tested by

no test coverage detected