| 1701 | } |
| 1702 | |
| 1703 | void ExternalCommandProcessor::EnableHostFlapping(double, const std::vector<String>& arguments) |
| 1704 | { |
| 1705 | Host::Ptr host = Host::GetByName(arguments[0]); |
| 1706 | |
| 1707 | if (!host) |
| 1708 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host flapping for non-existent host '" + arguments[0] + "'")); |
| 1709 | |
| 1710 | Log(LogNotice, "ExternalCommandProcessor") |
| 1711 | << "Enabling flapping detection for host '" << arguments[0] << "'"; |
| 1712 | |
| 1713 | host->ModifyAttribute("enable_flapping", true); |
| 1714 | } |
| 1715 | |
| 1716 | void ExternalCommandProcessor::DisableHostFlapping(double, const std::vector<String>& arguments) |
| 1717 | { |
nothing calls this directly
no test coverage detected