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

Method DisableSvcEventHandler

lib/icinga/externalcommandprocessor.cpp:1938–1949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1936}
1937
1938void ExternalCommandProcessor::DisableSvcEventHandler(double, const std::vector<String>& arguments)
1939{
1940 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1941
1942 if (!service)
1943 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable event handler for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1944
1945 Log(LogNotice, "ExternalCommandProcessor")
1946 << "Disabling event handler for service '" << arguments[1] + "'";
1947
1948 service->ModifyAttribute("enable_event_handler", false);
1949}
1950
1951void ExternalCommandProcessor::ChangeHostEventHandler(double, const std::vector<String>& arguments)
1952{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected