Module: check_mk
Branch: master
Commit: 97a31ffbd8a5188df11617f8755e1df532808fc6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97a31ffbd8a518…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Apr 9 14:34:47 2018 +0200
5832 Render snmpTrapAddress in a human-readable form even without SNMP trap translation
If SNMP trap translation was disabled, the originating IP address of a trap
appeared as a funny byte blob in EC messages. This has been fixed, the
usual dotted notation is used now.
Change-Id: I0ce011d15a0a42dee7ec1ff0a4be924e3e216947
---
.werks/5832 | 12 ++++++++++++
cmk/ec/main.py | 4 ++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/5832 b/.werks/5832
new file mode 100644
index 0000000..2d54c76
--- /dev/null
+++ b/.werks/5832
@@ -0,0 +1,12 @@
+Title: Render snmpTrapAddress in a human-readable form even without SNMP trap
translation
+Level: 1
+Component: ec
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1523277096
+Class: feature
+
+If SNMP trap translation was disabled, the originating IP address of a trap
+appeared as a funny byte blob in EC messages. This has been fixed, the
+usual dotted notation is used now.
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index 9f889fe..ed7ac4f 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -1489,8 +1489,8 @@ class EventServer(ECServerThread):
for oid, value in var_bind_list:
key = str(oid)
- if value.__class__.__name__ == 'ObjectIdentifier':
- val = str(value)
+ if value.__class__.__name__ in ['ObjectIdentifier',
'IpAddress']:
+ val = value.prettyPrint()
elif value.__class__.__name__ == 'TimeTicks':
val = self.fmt_timeticks(value._value)
else: