Module: check_mk
Branch: master
Commit: e60c59a82aad2c25887c49f50438550a7ab502ac
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e60c59a82aad2c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 29 15:57:51 2013 +0100
FIX Inline SNMP: Check_MK check helpers are closing UDP sockets now
In previous versions, the Check-Helpers in Check_MK were opening UDP
sockets for each host and caching them during their runtime. This resulted
in too many open sockets with a large amount of hosts. Now closing all
the sockets after an action iteration.
---
.werks/292 | 11 +++++++++++
ChangeLog | 1 +
modules/check_mk.py | 4 ++++
3 files changed, 16 insertions(+)
diff --git a/.werks/292 b/.werks/292
new file mode 100644
index 0000000..bcd1cd7
--- /dev/null
+++ b/.werks/292
@@ -0,0 +1,11 @@
+Title: Inline SNMP: Check_MK check helpers are closing UDP sockets now
+Level: 1
+Component: core
+Version: 1.2.3i7
+Date: 1385736912
+Class: fix
+
+In previous versions, the Check-Helpers in Check_MK were opening UDP
+sockets for each host and caching them during their runtime. This resulted
+in too many open sockets with a large amount of hosts. Now closing all
+the sockets after an action iteration.
diff --git a/ChangeLog b/ChangeLog
index 1fb1efd..0bb936d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core & Setup:
* 0217 FIX: More verbose error output for SNMP errors on the command line...
* 0288 FIX: Error messages of datasource programs (e.g. VSphere Agent) are now
visible within WATO...
+ * 0292 FIX: Inline SNMP: Check_MK check helpers are closing UDP sockets now...
Checks & Agents:
* 0060 cisco_fantray: new check for monitoring fan trays of Cisco Nexus switches
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 24c5164..3d26e16 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5069,6 +5069,10 @@ def cleanup_globals():
global g_walk_cache
g_walk_cache = {}
+ if 'g_snmp_sessions' in globals():
+ global g_snmp_sessions
+ g_snmp_sessions = {}
+
# Diagnostic function for detecting global variables that have
# changed during checking. This is slow and canno be used