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

Method DisableHostFlapping

lib/icinga/externalcommandprocessor.cpp:1716–1727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1714}
1715
1716void ExternalCommandProcessor::DisableHostFlapping(double, const std::vector<String>& arguments)
1717{
1718 Host::Ptr host = Host::GetByName(arguments[0]);
1719
1720 if (!host)
1721 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host flapping for non-existent host '" + arguments[0] + "'"));
1722
1723 Log(LogNotice, "ExternalCommandProcessor")
1724 << "Disabling flapping detection for host '" << arguments[0] << "'";
1725
1726 host->ModifyAttribute("enable_flapping", false);
1727}
1728
1729void ExternalCommandProcessor::EnableSvcFlapping(double, const std::vector<String>& arguments)
1730{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected