Module: check_mk
Branch: master
Commit: e3fa4f4be342c7322dcb5fce797ed44c888db370
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e3fa4f4be342c7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 12 14:37:15 2016 +0100
#3058 FIX Event Console is now allowing non loadable MIB modules on startup
This case of a MIB module processing error it is now logging the issue and
proceeding without any loaded MIB module.
---
.werks/3058 | 11 +++++++++++
ChangeLog | 2 ++
mkeventd/bin/mkeventd | 32 +++++++++++++++++++-------------
3 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/.werks/3058 b/.werks/3058
new file mode 100644
index 0000000..6d4497b
--- /dev/null
+++ b/.werks/3058
@@ -0,0 +1,11 @@
+Title: Event Console is now allowing non loadable MIB modules on startup
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455284199
+
+This case of a MIB module processing error it is now logging the issue and
+proceeding without any loaded MIB module.
diff --git a/ChangeLog b/ChangeLog
index 3b60cf6..56f7fda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
1.2.9i1:
+ Event Console:
+ * 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
1.2.8b1:
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index f61a6b2..7e0f138 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1151,24 +1151,30 @@ class EventServer:
return os.open(g_pipe_path, os.O_RDWR | os.O_NONBLOCK)
def load_mibs(self):
- builder = MibBuilder() # manages python MIB modules
+ try:
+ builder = MibBuilder() # manages python MIB modules
- # load MIBs from our compiled MIB and default MIB paths
- builder.setMibSources(*[DirMibSource(g_compiled_mibs_dir)]
- + list(builder.getMibSources()))
+ # load MIBs from our compiled MIB and default MIB paths
+ builder.setMibSources(*[DirMibSource(g_compiled_mibs_dir)]
+ + list(builder.getMibSources()))
- # Indicate we wish to load DESCRIPTION and other texts from MIBs
- builder.loadTexts = True
+ # Indicate we wish to load DESCRIPTION and other texts from MIBs
+ builder.loadTexts = True
- # This loads all or specified pysnmp MIBs into memory
- builder.loadModules()
+ # This loads all or specified pysnmp MIBs into memory
+ builder.loadModules()
- loaded_mib_module_names = builder.mibSymbols.keys()
- log('Loaded %d SNMP MIB modules' % len(loaded_mib_module_names))
- verbose('Found modules: %s' % (',
'.join(loaded_mib_module_names)))
+ loaded_mib_module_names = builder.mibSymbols.keys()
+ log('Loaded %d SNMP MIB modules' % len(loaded_mib_module_names))
+ verbose('Found modules: %s' % (',
'.join(loaded_mib_module_names)))
- # This object maintains various indices built from MIBs data
- self._mib_resolver = MibViewController(builder)
+ # This object maintains various indices built from MIBs data
+ self._mib_resolver = MibViewController(builder)
+ except SmiError, e:
+ if opt_debug:
+ raise
+ log("Exception while loading MIB modules. Proceeding without
modules!")
+ log("Exception: %s" % e)
# Format time difference seconds into approximated
# human readable value