mirror of https://github.com/Icinga/icinga2.git
Add a warning if EventCommand is not found when using command_endpoint
fixes #9773
This commit is contained in:
parent
766e2d73f4
commit
0712a02d1b
|
@ -1792,8 +1792,11 @@ Value ApiEvents::ExecuteCommandAPIHandler(const MessageOrigin& origin, const Dic
|
|||
return Empty;
|
||||
}
|
||||
} else if (command_type == "event_command") {
|
||||
if (!EventCommand::GetByName(command))
|
||||
if (!EventCommand::GetByName(command)) {
|
||||
Log(LogWarning, "ApiEvents")
|
||||
<< "Event command '" << command << "' does not exist.";
|
||||
return Empty;
|
||||
}
|
||||
} else
|
||||
return Empty;
|
||||
|
||||
|
|
Loading…
Reference in New Issue