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

Method EnableSvcFlapping

lib/icinga/externalcommandprocessor.cpp:1729–1740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1727}
1728
1729void ExternalCommandProcessor::EnableSvcFlapping(double, const std::vector<String>& arguments)
1730{
1731 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1732
1733 if (!service)
1734 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service flapping for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1735
1736 Log(LogNotice, "ExternalCommandProcessor")
1737 << "Enabling flapping detection for service '" << arguments[1] << "'";
1738
1739 service->ModifyAttribute("enable_flapping", true);
1740}
1741
1742void ExternalCommandProcessor::DisableSvcFlapping(double, const std::vector<String>& arguments)
1743{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected