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

Method DisableSvcFlapping

lib/icinga/externalcommandprocessor.cpp:1742–1753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1740}
1741
1742void ExternalCommandProcessor::DisableSvcFlapping(double, const std::vector<String>& arguments)
1743{
1744 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1745
1746 if (!service)
1747 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service flapping for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1748
1749 Log(LogNotice, "ExternalCommandProcessor")
1750 << "Disabling flapping detection for service '" << arguments[1] << "'";
1751
1752 service->ModifyAttribute("enable_flapping", false);
1753}
1754
1755void ExternalCommandProcessor::EnableNotifications(double, const std::vector<String>&)
1756{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected