| 1684 | } |
| 1685 | |
| 1686 | void ExternalCommandProcessor::EnableServicegroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1687 | { |
| 1688 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 1689 | |
| 1690 | if (!sg) |
| 1691 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup passive host checks for non-existent servicegroup '" + arguments[0] + "'")); |
| 1692 | |
| 1693 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 1694 | Host::Ptr host = service->GetHost(); |
| 1695 | |
| 1696 | Log(LogNotice, "ExternalCommandProcessor") |
| 1697 | << "Enabling passive checks for host '" << host->GetName() << "'"; |
| 1698 | |
| 1699 | host->ModifyAttribute("enable_passive_checks", true); |
| 1700 | } |
| 1701 | } |
| 1702 | |
| 1703 | void ExternalCommandProcessor::EnableHostFlapping(double, const std::vector<String>& arguments) |
| 1704 | { |
nothing calls this directly
no test coverage detected