| 1637 | } |
| 1638 | |
| 1639 | void ExternalCommandProcessor::EnableHostgroupHostChecks(double, const std::vector<String>& arguments) |
| 1640 | { |
| 1641 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 1642 | |
| 1643 | if (!hg) |
| 1644 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable hostgroup host checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 1645 | |
| 1646 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 1647 | Log(LogNotice, "ExternalCommandProcessor") |
| 1648 | << "Enabling active checks for host '" << host->GetName() << "'"; |
| 1649 | |
| 1650 | host->ModifyAttribute("enable_active_checks", true); |
| 1651 | } |
| 1652 | } |
| 1653 | |
| 1654 | void ExternalCommandProcessor::EnableHostgroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1655 | { |
nothing calls this directly
no test coverage detected