From 1b3f377809a20a97656b17e5891665d7893fc229 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 31 Jul 2015 16:04:03 +0200 Subject: [PATCH] Add a warning if EventCommand is not found when using command_endpoint fixes #9773 --- lib/icinga/apievents.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/icinga/apievents.cpp b/lib/icinga/apievents.cpp index fb6904af8..6108304d1 100644 --- a/lib/icinga/apievents.cpp +++ b/lib/icinga/apievents.cpp @@ -1768,8 +1768,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; -- 2.50.1