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

Method EnableHostCheck

lib/icinga/externalcommandprocessor.cpp:463–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463void ExternalCommandProcessor::EnableHostCheck(double, const std::vector<String>& arguments)
464{
465 Host::Ptr host = Host::GetByName(arguments[0]);
466
467 if (!host)
468 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host checks for non-existent host '" + arguments[0] + "'"));
469
470 Log(LogNotice, "ExternalCommandProcessor")
471 << "Enabling active checks for host '" << arguments[0] << "'";
472
473 host->ModifyAttribute("enable_active_checks", true);
474}
475
476void ExternalCommandProcessor::DisableHostCheck(double, const std::vector<String>& arguments)
477{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected