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

Method DisablePassiveHostChecks

lib/icinga/externalcommandprocessor.cpp:832–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830}
831
832void ExternalCommandProcessor::DisablePassiveHostChecks(double, const std::vector<String>& arguments)
833{
834 Host::Ptr host = Host::GetByName(arguments[0]);
835
836 if (!host)
837 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable passive host checks for non-existent host '" + arguments[0] + "'"));
838
839 Log(LogNotice, "ExternalCommandProcessor")
840 << "Disabling passive checks for host '" << arguments[0] << "'";
841
842 host->ModifyAttribute("enable_passive_checks", false);
843}
844
845void ExternalCommandProcessor::EnablePassiveSvcChecks(double, const std::vector<String>& arguments)
846{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected