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

Method EnableSvcCheck

lib/icinga/externalcommandprocessor.cpp:489–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void ExternalCommandProcessor::EnableSvcCheck(double, const std::vector<String>& arguments)
490{
491 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
492
493 if (!service)
494 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service check for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
495
496 Log(LogNotice, "ExternalCommandProcessor")
497 << "Enabling active checks for service '" << arguments[1] << "'";
498
499 service->ModifyAttribute("enable_active_checks", true);
500}
501
502void ExternalCommandProcessor::DisableSvcCheck(double, const std::vector<String>& arguments)
503{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected