| 1555 | } |
| 1556 | |
| 1557 | void ExternalCommandProcessor::DisableHostSvcNotifications(double, const std::vector<String>& arguments) |
| 1558 | { |
| 1559 | Host::Ptr host = Host::GetByName(arguments[0]); |
| 1560 | |
| 1561 | if (!host) |
| 1562 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable notifications for all services for non-existent host '" + arguments[0] + "'")); |
| 1563 | |
| 1564 | Log(LogNotice, "ExternalCommandProcessor") |
| 1565 | << "Disabling notifications for all services on host '" << arguments[0] << "'"; |
| 1566 | |
| 1567 | for (const Service::Ptr& service : host->GetServices()) { |
| 1568 | Log(LogNotice, "ExternalCommandProcessor") |
| 1569 | << "Disabling notifications for service '" << service->GetName() << "'"; |
| 1570 | |
| 1571 | service->ModifyAttribute("enable_notifications", false); |
| 1572 | } |
| 1573 | } |
| 1574 | |
| 1575 | void ExternalCommandProcessor::DisableHostgroupHostChecks(double, const std::vector<String>& arguments) |
| 1576 | { |
nothing calls this directly
no test coverage detected