| 1573 | } |
| 1574 | |
| 1575 | void ExternalCommandProcessor::DisableHostgroupHostChecks(double, const std::vector<String>& arguments) |
| 1576 | { |
| 1577 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 1578 | |
| 1579 | if (!hg) |
| 1580 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable hostgroup host checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 1581 | |
| 1582 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 1583 | Log(LogNotice, "ExternalCommandProcessor") |
| 1584 | << "Disabling active checks for host '" << host->GetName() << "'"; |
| 1585 | |
| 1586 | host->ModifyAttribute("enable_active_checks", false); |
| 1587 | } |
| 1588 | } |
| 1589 | |
| 1590 | void ExternalCommandProcessor::DisableHostgroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1591 | { |
nothing calls this directly
no test coverage detected