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

Method DelSvcDowntime

lib/icinga/externalcommandprocessor.cpp:996–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996void ExternalCommandProcessor::DelSvcDowntime(double, const std::vector<String>& arguments)
997{
998 int id = Convert::ToLong(arguments[0]);
999 String rid;
1000 auto dt (Downtime::GetDowntimeFromLegacyID(id));
1001
1002 if (dt) {
1003 rid = dt->GetName();
1004 }
1005
1006 try {
1007 Downtime::RemoveDowntime(rid, false, DowntimeRemovedByUser);
1008
1009 Log(LogNotice, "ExternalCommandProcessor")
1010 << "Removed downtime ID " << arguments[0];
1011 } catch (const invalid_downtime_removal_error& error) {
1012 Log(LogWarning, "ExternalCommandProcessor") << error.what();
1013 }
1014}
1015
1016void ExternalCommandProcessor::ScheduleHostDowntime(double, const std::vector<String>& arguments)
1017{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
GetNameMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected