| 869 | } |
| 870 | |
| 871 | void ExternalCommandProcessor::EnableServicegroupPassiveSvcChecks(double, const std::vector<String>& arguments) |
| 872 | { |
| 873 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 874 | |
| 875 | if (!sg) |
| 876 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup passive service checks for non-existent servicegroup '" + arguments[0] + "'")); |
| 877 | |
| 878 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 879 | Log(LogNotice, "ExternalCommandProcessor") |
| 880 | << "Enabling passive checks for service '" << service->GetName() << "'"; |
| 881 | |
| 882 | service->ModifyAttribute("enable_passive_checks", true); |
| 883 | } |
| 884 | } |
| 885 | |
| 886 | void ExternalCommandProcessor::DisableServicegroupPassiveSvcChecks(double, const std::vector<String>& arguments) |
| 887 | { |
nothing calls this directly
no test coverage detected