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

Method DelHostDowntime

lib/icinga/externalcommandprocessor.cpp:1115–1133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1113}
1114
1115void ExternalCommandProcessor::DelHostDowntime(double, const std::vector<String>& arguments)
1116{
1117 int id = Convert::ToLong(arguments[0]);
1118 String rid;
1119 auto dt (Downtime::GetDowntimeFromLegacyID(id));
1120
1121 if (dt) {
1122 rid = dt->GetName();
1123 }
1124
1125 try {
1126 Downtime::RemoveDowntime(rid, false, DowntimeRemovedByUser);
1127
1128 Log(LogNotice, "ExternalCommandProcessor")
1129 << "Removed downtime ID " << arguments[0];
1130 } catch (const invalid_downtime_removal_error& error) {
1131 Log(LogWarning, "ExternalCommandProcessor") << error.what();
1132 }
1133}
1134
1135void ExternalCommandProcessor::DelDowntimeByHostName(double, const std::vector<String>& arguments)
1136{

Callers

nothing calls this directly

Calls 3

LogClass · 0.85
GetNameMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected