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

Method DisablePassiveSvcChecks

lib/icinga/externalcommandprocessor.cpp:858–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858void ExternalCommandProcessor::DisablePassiveSvcChecks(double, const std::vector<String>& arguments)
859{
860 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
861
862 if (!service)
863 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service checks for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
864
865 Log(LogNotice, "ExternalCommandProcessor")
866 << "Disabling passive checks for service '" << arguments[1] << "'";
867
868 service->ModifyAttribute("enable_passive_checks", false);
869}
870
871void ExternalCommandProcessor::EnableServicegroupPassiveSvcChecks(double, const std::vector<String>& arguments)
872{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected