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

Method DelayHostNotification

lib/icinga/externalcommandprocessor.cpp:1457–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1455}
1456
1457void ExternalCommandProcessor::DelayHostNotification(double, const std::vector<String>& arguments)
1458{
1459 Host::Ptr host = Host::GetByName(arguments[0]);
1460
1461 if (!host)
1462 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delay host notification for non-existent host '" + arguments[0] + "'"));
1463
1464 Log(LogNotice, "ExternalCommandProcessor")
1465 << "Delaying notifications for host '" << host->GetName() << "'";
1466
1467 for (const Notification::Ptr& notification : host->GetNotifications()) {
1468 notification->SetNextNotification(Convert::ToDouble(arguments[1]));
1469 }
1470}
1471
1472void ExternalCommandProcessor::DelaySvcNotification(double, const std::vector<String>& arguments)
1473{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
GetNameMethod · 0.45
GetNotificationsMethod · 0.45

Tested by

no test coverage detected