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

Method DelAllSvcComments

lib/icinga/externalcommandprocessor.cpp:1406–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1404}
1405
1406void ExternalCommandProcessor::DelAllSvcComments(double, const std::vector<String>& arguments)
1407{
1408 Service::Ptr service = Service::GetByNamePair(arguments[0], arguments[1]);
1409
1410 if (!service)
1411 BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delete all service comments for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
1412
1413 Log(LogNotice, "ExternalCommandProcessor")
1414 << "Removing all comments for service " << service->GetName();
1415 service->RemoveAllComments();
1416}
1417
1418void ExternalCommandProcessor::SendCustomHostNotification(double, const std::vector<String>& arguments)
1419{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
RemoveAllCommentsMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected