Module: check_mk
Branch: master
Commit: 9d2c2679d5a8e547173d4c82a4a4c7d2377feb65
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9d2c2679d5a8e5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Nov 6 18:09:46 2013 +0100
FIX snmptd_mkevent.py: fixed crash on startup
---
.werks/26 | 8 ++++++++
ChangeLog | 7 +++++--
doc/treasures/Event_Console/snmptd_mkevent.py | 7 ++++---
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.werks/26 b/.werks/26
new file mode 100644
index 0000000..471516a
--- /dev/null
+++ b/.werks/26
@@ -0,0 +1,8 @@
+Title: snmptd_mkevent.py: fixed crash on startup
+Level: 1
+Component: ec
+Version: 1.2.3i7
+Date: 1383757771
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 64fa31d..daea498 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
1.2.3i7:
Checks & Agents:
- * 0060: cisco_fantray: new check for monitoring fan trays of Cisco Nexus switches...
- * 0061: cisco_cpu: check now recognizes new object cpmCPUTotal5minRev...
+ * 0060 cisco_fantray: new check for monitoring fan trays of Cisco Nexus switches...
+ * 0061 cisco_cpu: check now recognizes new object cpmCPUTotal5minRev...
* 0024 FIX: cisco_wlc: removed configuration parameter ap_model...
Multisite:
@@ -20,6 +20,9 @@
* 0054 New labelling options for availability table...
* 0055 Allow grouping by host, host group or service group...
+ Event Console:
+ * 0026 FIX: snmptd_mkevent.py: fixed crash on startup...
+
Livestatus:
* 0023 FIX: table statehist: code cleanup / minor performance improvements...
diff --git a/doc/treasures/Event_Console/snmptd_mkevent.py
b/doc/treasures/Event_Console/snmptd_mkevent.py
index c9ef958..3d77ad6 100755
--- a/doc/treasures/Event_Console/snmptd_mkevent.py
+++ b/doc/treasures/Event_Console/snmptd_mkevent.py
@@ -43,7 +43,8 @@ import time
import sys
import re
-site_name = os.environ.pop('OMD_SITE')
+# Insert here the name of your omd site
+site_name = "TESTSITE"
deamon_path = "/omd/sites/%s/tmp/run/mkeventd/events" % site_name
data = []
@@ -58,11 +59,11 @@ for line in sys.stdin:
data.append(line)
msg = " ".join(data[2:])
-host, ip = data[:2]
+host, ip = data[:2]
if match_host:
host = match_host.strip()
-#Write to mkevent Socket
+#Write to mkevent Socket
out = open(deamon_path, "w")
timestamp = time.strftime("%b %d %H:%M:%S", time.localtime(time.time()))
out.write("<5>%s %s trap: %s\n" % (timestamp, host, msg))