| 1603 | } |
| 1604 | |
| 1605 | void ExternalCommandProcessor::DisableServicegroupHostChecks(double, const std::vector<String>& arguments) |
| 1606 | { |
| 1607 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 1608 | |
| 1609 | if (!sg) |
| 1610 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable servicegroup host checks for non-existent servicegroup '" + arguments[0] + "'")); |
| 1611 | |
| 1612 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 1613 | Host::Ptr host = service->GetHost(); |
| 1614 | |
| 1615 | Log(LogNotice, "ExternalCommandProcessor") |
| 1616 | << "Disabling active checks for host '" << host->GetName() << "'"; |
| 1617 | |
| 1618 | host->ModifyAttribute("enable_active_checks", false); |
| 1619 | } |
| 1620 | } |
| 1621 | |
| 1622 | void ExternalCommandProcessor::DisableServicegroupPassiveHostChecks(double, const std::vector<String>& arguments) |
| 1623 | { |
nothing calls this directly
no test coverage detected