| 2179 | } |
| 2180 | |
| 2181 | void ExternalCommandProcessor::EnableHostgroupHostNotifications(double, const std::vector<String>& arguments) |
| 2182 | { |
| 2183 | HostGroup::Ptr hg = HostGroup::GetByName(arguments[0]); |
| 2184 | |
| 2185 | if (!hg) |
| 2186 | BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host notifications for non-existent hostgroup '" + arguments[0] + "'")); |
| 2187 | |
| 2188 | for (const Host::Ptr& host : hg->GetMembers()) { |
| 2189 | Log(LogNotice, "ExternalCommandProcessor") |
| 2190 | << "Enabling notifications for host '" << host->GetName() << "'"; |
| 2191 | |
| 2192 | host->ModifyAttribute("enable_notifications", true); |
| 2193 | } |
| 2194 | } |
| 2195 | |
| 2196 | void ExternalCommandProcessor::EnableHostgroupSvcNotifications(double, const std::vector<String>& arguments) |
| 2197 | { |
nothing calls this directly
no test coverage detected