| 770 | } |
| 771 | |
| 772 | void ExternalCommandProcessor::DisableHostgroupSvcChecks(double, const std::vector<String>& arguments) |
| 773 | { |
| 774 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 775 | |
| 776 | if (!hg) |
| 777 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable hostgroup service checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 778 | |
| 779 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 780 | for (const Service::Ptr& service : host->GetServices()) { |
| 781 | Log(LogNotice, "ExternalCommandProcessor") |
| 782 | << "Disabling active checks for service '" << service->GetName() << "'"; |
| 783 | |
| 784 | service->ModifyAttribute("enable_active_checks", false); |
| 785 | } |
| 786 | } |
| 787 | } |
| 788 | |
| 789 | void ExternalCommandProcessor::EnableServicegroupSvcChecks(double, const std::vector<String>& arguments) |
| 790 | { |
nothing calls this directly
no test coverage detected