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

Method DisableHostCheck

lib/icinga/externalcommandprocessor.cpp:476–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void ExternalCommandProcessor::DisableHostCheck(double, const std::vector<String>& arguments)
477{
478 Host::Ptr host = Host::GetByName(arguments[0]);
479
480 if (!host)
481 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host check non-existent host '" + arguments[0] + "'"));
482
483 Log(LogNotice, "ExternalCommandProcessor")
484 << "Disabling active checks for host '" << arguments[0] << "'";
485
486 host->ModifyAttribute("enable_active_checks", false);
487}
488
489void ExternalCommandProcessor::EnableSvcCheck(double, const std::vector<String>& arguments)
490{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected