Module: check_mk
Branch: master
Commit: 4974ede0b0161966039bd3ce7ff40fc8d78e7bfc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4974ede0b01619…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 3 10:50:35 2013 +0200
Better error message when check_mkevents called out of OMD site
---
mkeventd/lib/check_mkevents | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mkeventd/lib/check_mkevents b/mkeventd/lib/check_mkevents
index 1ffa8e1..7bf0ee4 100755
--- a/mkeventd/lib/check_mkevents
+++ b/mkeventd/lib/check_mkevents
@@ -2,7 +2,11 @@
import os, socket, sys
-socket_path = os.getenv("OMD_ROOT") + "/tmp/run/mkeventd/status"
+try:
+ socket_path = os.getenv("OMD_ROOT") + "/tmp/run/mkeventd/status"
+except:
+ sys.stdout.write("UNKNOWN - OMD_ROOT is not set, no socket path is
defined.\n")
+ sys.exit(3)
def query(query, remote_host):
try: