| 753 | } |
| 754 | |
| 755 | void ExternalCommandProcessor::EnableHostgroupSvcChecks(double, const std::vector<String>& arguments) |
| 756 | { |
| 757 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 758 | |
| 759 | if (!hg) |
| 760 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable hostgroup service checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 761 | |
| 762 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 763 | for (const Service::Ptr& service : host->GetServices()) { |
| 764 | Log(LogNotice, "ExternalCommandProcessor") |
| 765 | << "Enabling active checks for service '" << service->GetName() << "'"; |
| 766 | |
| 767 | service->ModifyAttribute("enable_active_checks", true); |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | void ExternalCommandProcessor::DisableHostgroupSvcChecks(double, const std::vector<String>& arguments) |
| 773 | { |
nothing calls this directly
no test coverage detected