Module: check_mk
Branch: master
Commit: be4fe91fac572ebfd6e076b50444c5fdb5c51d47
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=be4fe91fac572e…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Mar 14 16:52:21 2016 +0100
3097 FIX mkeventd: fixed crash with non-descriptive error message if mibs couldn't be
loaded
---
.werks/3097 | 10 ++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/3097 b/.werks/3097
new file mode 100644
index 0000000..889972f
--- /dev/null
+++ b/.werks/3097
@@ -0,0 +1,10 @@
+Title: mkeventd: fixed crash with non-descriptive error message if mibs couldn't be
loaded
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1457970667
+
+
diff --git a/ChangeLog b/ChangeLog
index 65724fb..e3de1cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,7 @@
* 2999 The contact name is now included in Event Console notifications...
* 3262 Event Console: bulk delete button for custom MIBs now available
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
+ * 3097 FIX: mkeventd: fixed crash with non-descriptive error message if mibs
couldn't be loaded
Livestatus:
* 3233 FIX: Fixed shutdown of Nagios core with Livestatus module...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 28a8812..dbe74b7 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1217,6 +1217,10 @@ class EventServer:
# Convert pysnmp datatypes to simply handable ones
def snmptrap_translate_varbinds(self, var_bind_list):
var_binds = []
+ if self._mib_resolver is None:
+ log('Failed to translate OIDs, no modules loaded (see above)')
+ return [(str(oid), str(value)) for oid, value in var_bind_list]
+
for oid, value in var_bind_list:
try:
mib_var = ObjectType(ObjectIdentity(oid),
value).resolveWithMib(self._mib_resolver)