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

Method EnablePassiveHostChecks

lib/icinga/externalcommandprocessor.cpp:819–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819void ExternalCommandProcessor::EnablePassiveHostChecks(double, const std::vector<String>& arguments)
820{
821 Host::Ptr host = Host::GetByName(arguments[0]);
822
823 if (!host)
824 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable passive host checks for non-existent host '" + arguments[0] + "'"));
825
826 Log(LogNotice, "ExternalCommandProcessor")
827 << "Enabling passive checks for host '" << arguments[0] << "'";
828
829 host->ModifyAttribute("enable_passive_checks", true);
830}
831
832void ExternalCommandProcessor::DisablePassiveHostChecks(double, const std::vector<String>& arguments)
833{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected