Module: check_mk
Branch: master
Commit: 737e4a3b9a19a1cb5fa88cd69261d4b5a70f2bfe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=737e4a3b9a19a1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 21 15:53:15 2013 -0400
FIX: EC snapin: handle case when EC not running
---
mkeventd/web/plugins/sidebar/mkeventd.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mkeventd/web/plugins/sidebar/mkeventd.py
b/mkeventd/web/plugins/sidebar/mkeventd.py
index cc051fd..a8dfd93 100644
--- a/mkeventd/web/plugins/sidebar/mkeventd.py
+++ b/mkeventd/web/plugins/sidebar/mkeventd.py
@@ -36,9 +36,15 @@ def render_mkeventd_performance():
html.write("<tr><td class=left>%s:</td>"
"<td
class=right><strong>%s</strong></td></tr>" % (left,
right))
+ try:
+ raw_data = mkeventd.query("GET status")
+ except:
+ html.write(_("Event Console is not running."))
+ return
+
html.write("<table class=\"content_center
mkeventd_performance\">\n")
- raw_data = mkeventd.query("GET status")
+
data = dict(zip(raw_data[0], raw_data[1]))
columns = [
(_("Received messages"), "message",
"%.2f/s"),