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

Method EnableSvcNotifications

lib/icinga/externalcommandprocessor.cpp:1513–1524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1511}
1512
1513void ExternalCommandProcessor::EnableSvcNotifications(double, const std::vector<String>& arguments)
1514{
1515 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1516
1517 if (!service)
1518 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service notifications for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1519
1520 Log(LogNotice, "ExternalCommandProcessor")
1521 << "Enabling notifications for service '" << arguments[1] << "'";
1522
1523 service->ModifyAttribute("enable_notifications", true);
1524}
1525
1526void ExternalCommandProcessor::DisableSvcNotifications(double, const std::vector<String>& arguments)
1527{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected