| 1667 | } |
| 1668 | |
| 1669 | void ExternalCommandProcessor::EnableServicegroupHostChecks(double, const std::vector<String>& arguments) |
| 1670 | { |
| 1671 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 1672 | |
| 1673 | if (!sg) |
| 1674 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup host checks for non-existent servicegroup '" + arguments[0] + "'")); |
| 1675 | |
| 1676 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 1677 | Host::Ptr host = service->GetHost(); |
| 1678 | |
| 1679 | Log(LogNotice, "ExternalCommandProcessor") |
| 1680 | << "Enabling active checks for host '" << host->GetName() << "'"; |
| 1681 | |
| 1682 | host->ModifyAttribute("enable_active_checks", true); |
| 1683 | } |
| 1684 | } |
| 1685 | |
| 1686 | void ExternalCommandProcessor::EnableServicegroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1687 | { |
nothing calls this directly
no test coverage detected