| 1727 | } |
| 1728 | |
| 1729 | void 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 | |
| 1742 | void ExternalCommandProcessor::DisableSvcFlapping(double, const std::vector<String>& arguments) |
| 1743 | { |
nothing calls this directly
no test coverage detected