Module: check_mk
Branch: master
Commit: 7fa4335e87a242a78c8f53e8bef9f8154f529e2e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7fa4335e87a242…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Apr 15 14:06:08 2016 +0200
Added sending host to SNMP trap parse errors
---
bin/mkeventd | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/mkeventd b/bin/mkeventd
index 3e41564..90bec36 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -1420,9 +1420,11 @@ class EventServer:
# Read events from builtin snmptrap server
if self._snmptrap != None and self._snmptrap.fileno() in readable:
try:
- self.process_raw_data(self.process_snmptrap,
self._snmptrap.recvfrom(65535))
+ data = self._snmptrap.recvfrom(65535)
+ self.process_raw_data(self.process_snmptrap, data)
except Exception, e:
- log('Exception handling a snmptrap (skipping this one): %s' %
format_exception())
+ log('Exception handling a SNMP trap from "%s". Skipping
this one.\n%s' %
+ (data[1][0],
format_exception()))
# check wether or not spool files are available
spool_dir = g_state_dir + "/spool"