From: Michael Friedrich Date: Fri, 31 Jul 2015 14:04:03 +0000 (+0200) Subject: Add a warning if EventCommand is not found when using command_endpoint X-Git-Tag: v2.4.0~457 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0712a02d1b3f769f06ef3c49108f48626a539f78;p=icinga2 Add a warning if EventCommand is not found when using command_endpoint fixes #9773 --- diff --git a/lib/icinga/apievents.cpp b/lib/icinga/apievents.cpp index d56592477..dc69e9bae 100644 --- a/lib/icinga/apievents.cpp +++ b/lib/icinga/apievents.cpp @@ -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;