| 787 | } |
| 788 | |
| 789 | void ExternalCommandProcessor::EnableServicegroupSvcChecks(double, const std::vector<String>& arguments) |
| 790 | { |
| 791 | ServiceGroup::Ptr sg = ServiceGroup::GetByName(arguments[0]); |
| 792 | |
| 793 | if (!sg) |
| 794 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup service checks for non-existent servicegroup '" + arguments[0] + "'")); |
| 795 | |
| 796 | for (const Service::Ptr& service : sg->GetMembers()) { |
| 797 | Log(LogNotice, "ExternalCommandProcessor") |
| 798 | << "Enabling active checks for service '" << service->GetName() << "'"; |
| 799 | |
| 800 | service->ModifyAttribute("enable_active_checks", true); |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | void ExternalCommandProcessor::DisableServicegroupSvcChecks(double, const std::vector<String>& arguments) |
| 805 | { |
nothing calls this directly
no test coverage detected