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

Method EnableSvcEventHandler

lib/icinga/externalcommandprocessor.cpp:1925–1936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1923}
1924
1925void ExternalCommandProcessor::EnableSvcEventHandler(double, const std::vector<String>& arguments)
1926{
1927 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1928
1929 if (!service)
1930 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable event handler for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1931
1932 Log(LogNotice, "ExternalCommandProcessor")
1933 << "Enabling event handler for service '" << arguments[1] << "'";
1934
1935 service->ModifyAttribute("enable_event_handler", true);
1936}
1937
1938void ExternalCommandProcessor::DisableSvcEventHandler(double, const std::vector<String>& arguments)
1939{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected