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

Method DisableSvcNotifications

lib/icinga/externalcommandprocessor.cpp:1526–1537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1524}
1525
1526void ExternalCommandProcessor::DisableSvcNotifications(double, const std::vector<String>& arguments)
1527{
1528 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1529
1530 if (!service)
1531 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service notifications for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1532
1533 Log(LogNotice, "ExternalCommandProcessor")
1534 << "Disabling notifications for service '" << arguments[1] << "'";
1535
1536 service->ModifyAttribute("enable_notifications", false);
1537}
1538
1539void ExternalCommandProcessor::EnableHostSvcNotifications(double, const std::vector<String>& arguments)
1540{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected