| 1652 | } |
| 1653 | |
| 1654 | void ExternalCommandProcessor::EnableHostgroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1655 | { |
| 1656 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 1657 | |
| 1658 | if (!hg) |
| 1659 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable hostgroup passive host checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 1660 | |
| 1661 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 1662 | Log(LogNotice, "ExternalCommandProcessor") |
| 1663 | << "Enabling passive checks for host '" << host->GetName() << "'"; |
| 1664 | |
| 1665 | host->ModifyAttribute("enable_passive_checks", true); |
| 1666 | } |
| 1667 | } |
| 1668 | |
| 1669 | void ExternalCommandProcessor::EnableServicegroupHostChecks(double, const std::vector<String>& arguments) |
| 1670 | { |
nothing calls this directly
no test coverage detected