| 916 | } |
| 917 | |
| 918 | void ExternalCommandProcessor::DisableHostgroupPassiveSvcChecks(double, const std::vector<String>& arguments) |
| 919 | { |
| 920 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 921 | |
| 922 | if (!hg) |
| 923 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable hostgroup passive service checks for non-existent hostgroup '" + arguments[0] + "'")); |
| 924 | |
| 925 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 926 | for (const Service::Ptr& service : host->GetServices()) { |
| 927 | Log(LogNotice, "ExternalCommandProcessor") |
| 928 | << "Disabling passive checks for service '" << service->GetName() << "'"; |
| 929 | |
| 930 | service->ModifyAttribute("enable_passive_checks", false); |
| 931 | } |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | void ExternalCommandProcessor::ProcessFile(const WaitGroup::Ptr& producer, double, const std::vector<String>& arguments) |
| 936 | { |
nothing calls this directly
no test coverage detected