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

Method DisableHostEventHandler

lib/icinga/externalcommandprocessor.cpp:1912–1923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1910}
1911
1912void ExternalCommandProcessor::DisableHostEventHandler(double, const std::vector<String>& arguments)
1913{
1914 Host::Ptr host = Host::GetByName(arguments[0]);
1915
1916 if (!host)
1917 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable event handler for non-existent host '" + arguments[0] + "'"));
1918
1919 Log(LogNotice, "ExternalCommandProcessor")
1920 << "Disabling event handler for host '" << arguments[0] << "'";
1921
1922 host->ModifyAttribute("enable_event_handler", false);
1923}
1924
1925void ExternalCommandProcessor::EnableSvcEventHandler(double, const std::vector<String>& arguments)
1926{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected