| 576 | } |
| 577 | |
| 578 | void ExternalCommandProcessor::EnableHostSvcChecks(double, const std::vector<String>& arguments) |
| 579 | { |
| 580 | Host::Ptr host = Host::GetByName(arguments[0]); |
| 581 | |
| 582 | if (!host) |
| 583 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host service checks for non-existent host '" + arguments[0] + "'")); |
| 584 | |
| 585 | for (const Service::Ptr& service : host->GetServices()) { |
| 586 | Log(LogNotice, "ExternalCommandProcessor") |
| 587 | << "Enabling active checks for service '" << service->GetName() << "'"; |
| 588 | |
| 589 | service->ModifyAttribute("enable_active_checks", true); |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | void ExternalCommandProcessor::DisableHostSvcChecks(double, const std::vector<String>& arguments) |
| 594 | { |
nothing calls this directly
no test coverage detected