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

Method DisableHostNotifications

lib/icinga/externalcommandprocessor.cpp:1500–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498}
1499
1500void ExternalCommandProcessor::DisableHostNotifications(double, const std::vector<String>& arguments)
1501{
1502 Host::Ptr host = Host::GetByName(arguments[0]);
1503
1504 if (!host)
1505 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host notifications for non-existent host '" + arguments[0] + "'"));
1506
1507 Log(LogNotice, "ExternalCommandProcessor")
1508 << "Disabling notifications for host '" << arguments[0] << "'";
1509
1510 host->ModifyAttribute("enable_notifications", false);
1511}
1512
1513void ExternalCommandProcessor::EnableSvcNotifications(double, const std::vector<String>& arguments)
1514{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected