]> granicus.if.org Git - icinga2/commitdiff
Add a warning if EventCommand is not found when using command_endpoint
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 31 Jul 2015 14:04:03 +0000 (16:04 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 31 Jul 2015 14:04:03 +0000 (16:04 +0200)
fixes #9773

lib/icinga/apievents.cpp

index d56592477279132c2c11ede5d81db9d904e0b050..dc69e9bae7b0f2a28681cde48d6a1fc203d941c4 100644 (file)
@@ -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;