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

Method DisableSvcCheck

lib/icinga/externalcommandprocessor.cpp:502–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500}
501
502void ExternalCommandProcessor::DisableSvcCheck(double, const std::vector<String>& arguments)
503{
504 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
505
506 if (!service)
507 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service check for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
508
509 Log(LogNotice, "ExternalCommandProcessor")
510 << "Disabling active checks for service '" << arguments[1] << "'";
511
512 service->ModifyAttribute("enable_active_checks", false);
513}
514
515void ExternalCommandProcessor::ShutdownProcess(double, const std::vector<String>&)
516{

Callers

nothing calls this directly

Calls 2

LogClass · 0.85
ModifyAttributeMethod · 0.80

Tested by

no test coverage detected