MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EnableHostNotifications

Method EnableHostNotifications

lib/icinga/externalcommandprocessor.cpp:1487–1498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1485}
1486
1487void ExternalCommandProcessor::EnableHostNotifications(double, const std::vector<String>& arguments)
1488{
1489 Host::Ptr host = Host::GetByName(arguments[0]);
1490
1491 if (!host)
1492 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host notifications for non-existent host '" + arguments[0] + "'"));
1493
1494 Log(LogNotice, "ExternalCommandProcessor")
1495 << "Enabling notifications for host '" << arguments[0] << "'";
1496
1497 host->ModifyAttribute("enable_notifications", true);
1498}
1499
1500void ExternalCommandProcessor::DisableHostNotifications(double, const std::vector<String>& arguments)
1501{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected