Module: check_mk
Branch: master
Commit: 3ebdf3cb6f34ca4edb5b0200c2ca5b73fec8ff1b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3ebdf3cb6f34ca…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 26 08:57:24 2018 +0200
6716 FIX Add SNMP trap processing log target for deep SNMP trap debugging
A new option "SNMP trap processing" has been added to the Event Console log setting
which tells the underlying SNMP library (PySNMP) to write it's debug output to the
<tt>var/log/mkeventd.log</tt> when set to <tt>Debug</tt>.
Please be careful with this setting. It may result in a lot of log output when you
set it to debug for instances which receive a lot of SNMP traps.
CMK-905
Change-Id: I7d4589434c45edd2b92545b0eb04fdd2eaad00e7
---
.werks/6716 | 27 +++++++++++++++++++++++++++
cmk/ec/.f12 | 2 +-
cmk/ec/main.py | 5 +++--
cmk/ec/snmp.py | 4 ++++
cmk/gui/wato/mkeventd.py | 3 +++
5 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/.werks/6716 b/.werks/6716
new file mode 100644
index 0000000..0f0e7b1
--- /dev/null
+++ b/.werks/6716
@@ -0,0 +1,27 @@
+Title: Add SNMP trap processing log target for deep SNMP trap debugging
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1537879295
+
+A new option "SNMP trap processing" has been added to the Event Console log setting.
+
+This setting is currently used in the following ways:
+
+<ul>
+<li>It controls the log level of all SNMP related log messages. Previously some
+of the SNMP messages were controlled through the "Processing of incoming
+events" setting.</li>
+<li>Nothing is logged in <i>Informational</i> log level</li>
+<li>When set to <i>Verbose</i> it shows details about which traps are received
+by the Event Console and how they are handled on protocol level (whether they
+are accepted or dropped).</li>
+<li>When set to <i>Debug</i> it tells the underlying SNMP library (PySNMP) to
+write it's debug output to the <tt>var/log/mkeventd.log</tt>. Please be careful
+with this level. It may result in a lot of log output when you set it to debug
+for instances which receive a lot of SNMP traps.</li>
+</ul>
diff --git a/cmk/ec/.f12 b/cmk/ec/.f12
index 3384149..662901d 100644
--- a/cmk/ec/.f12
+++ b/cmk/ec/.f12
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
+SITE=${SITE:-$(cat ../../.site 2>/dev/null || true)}
SITE=${SITE:-$(omd sites --bare | head -n 1)}
ROOT=/omd/sites/$SITE
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index 464152f..0e37388 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -698,7 +698,7 @@ class EventServer(ECServerThread):
self.open_syslog()
self.open_syslog_tcp()
self.open_snmptrap()
- self._snmp_trap_engine = cmk.ec.snmp.SNMPTrapEngine(self.settings, self._config, self._logger, self.handle_snmptrap)
+ self._snmp_trap_engine = cmk.ec.snmp.SNMPTrapEngine(self.settings, self._config, self._logger.getChild("snmp"), self.handle_snmptrap)
self._snmp_trap_translator = cmk.ec.snmp.SNMPTrapTranslator(self.settings, self._config, self._logger)
@classmethod
@@ -1328,7 +1328,7 @@ class EventServer(ECServerThread):
def reload_configuration(self, config):
self._config = config
- self._snmp_trap_engine = cmk.ec.snmp.SNMPTrapEngine(self.settings, self._config, self._logger, self.handle_snmptrap)
+ self._snmp_trap_engine = cmk.ec.snmp.SNMPTrapEngine(self.settings, self._config, self._logger.getChild("snmp"), self.handle_snmptrap)
self._snmp_trap_translator = cmk.ec.snmp.SNMPTrapTranslator(self.settings, self._config, self._logger)
self.compile_rules(self._config["rules"], self._config["rule_packs"])
self.host_config.initialize()
@@ -3942,6 +3942,7 @@ def load_configuration(settings, logger, slave_status):
logger.getChild("EventServer").setLevel(levels["cmk.mkeventd.EventServer"])
logger.getChild("EventStatus").setLevel(levels["cmk.mkeventd.EventStatus"])
logger.getChild("StatusServer").setLevel(levels["cmk.mkeventd.StatusServer"])
+ logger.getChild("EventServer.snmp").setLevel(levels["cmk.mkeventd.EventServer.snmp"])
logger.getChild("lock").setLevel(levels["cmk.mkeventd.lock"])
# Are we a replication slave? Parts of the configuration
diff --git a/cmk/ec/snmp.py b/cmk/ec/snmp.py
index d1b5e3b..50d606c 100644
--- a/cmk/ec/snmp.py
+++ b/cmk/ec/snmp.py
@@ -25,6 +25,7 @@
# Boston, MA 02110-1301 USA.
# Needed for receiving traps
+import pysnmp.debug
import pysnmp.entity.config
import pysnmp.entity.engine
import pysnmp.entity.rfc3413.ntfrcv
@@ -57,6 +58,9 @@ class SNMPTrapEngine(object):
self._initialize_snmp_credentials(config)
self._snmp_receiver = SNMPTrapEngine.ECNotificationReceiver(self.snmp_engine, callback)
+ # Hand over our logger to PySNMP
+ pysnmp.debug.setLogger(pysnmp.debug.Debug("all", printer=self._logger.debug))
+
@staticmethod
def _auth_proto_for(proto_name):
diff --git a/cmk/gui/wato/mkeventd.py b/cmk/gui/wato/mkeventd.py
index c53de79..62018a7 100644
--- a/cmk/gui/wato/mkeventd.py
+++ b/cmk/gui/wato/mkeventd.py
@@ -3164,6 +3164,9 @@ if mkeventd_enabled:
("cmk.mkeventd.lock", _("Locking"),
_("Log level for the locking mechanics. Setting this to debug will enable "
"log entries for each lock/unlock action.")),
+ ("cmk.mkeventd.EventServer.snmp", _("SNMP trap processing"),
+ _("Log level for the SNMP trap processing mechanics. Setting this to debug will enable "
+ "detailed log entries for each received SNMP trap.")),
]:
elements.append(
(component, DropdownChoice(
Module: check_mk
Branch: master
Commit: b7a1711ec70521fd4ff263430f188f37429eebd4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7a1711ec70521…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 25 17:37:50 2018 +0200
6717 3rd party components and licenses are now listed in central file
Check_MK contains a lot of open source software. The licensing and copyright of
each package can now be found in a central CSV file. This file is located in
<tt>share/doc/Licenses.csv</tt> in each released version. You can find the file
of your local default version e.g. at <tt>/omd/versions/default/share/doc/Licenses.csv</tt>.
The latest file is always available in the git at <tt>omd/Licenses.csv</tt> which
is also available via the git browser
<a href="https://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=omd/Makefile/Li…">here</a>.
CMK-822
Change-Id: Ic636131c26242ba9df599d9b517bc619b2c8ab0f
---
.werks/6717 | 18 ++++
omd/Licenses.README | 6 ++
omd/Licenses.csv | 274 +++++++++++++++++++++++++++++++++++++++++++++++++++
omd/Licenses.ods | Bin 0 -> 31221 bytes
omd/Makefile | 1 +
omd/debian/copyright | 7 +-
6 files changed, 302 insertions(+), 4 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=b7a1711ec7…
Module: check_mk
Branch: master
Commit: 619d1dbedf5c84e8a8a2e5b69b64887c8378ef48
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=619d1dbedf5c84…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 26 08:44:08 2018 +0200
Fixed wrong URL in werk
Change-Id: I0640b8e2f938051b0ba9bab49b4e52e19da86604
---
.werks/6717 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.werks/6717 b/.werks/6717
index 35ec888..137d9f2 100644
--- a/.werks/6717
+++ b/.werks/6717
@@ -15,4 +15,4 @@ of your local default version e.g. at <tt>/omd/versions/default/share/doc/Licens
The latest file is always available in the git at <tt>omd/Licenses.csv</tt> which
is also available via the git browser
-<a href="https://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=omd/Makefile/Li…">here</a>.
+<a href="https://git.mathias-kettner.de/git/?p=check_mk.git;a=blob;f=omd/Licenses.csv">here</a>.
Module: check_mk
Branch: master
Commit: c440ea0b3f560a00a2d80db6287c33ad6c301387
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c440ea0b3f560a…
Author: Andreas Umbreit <au(a)mathias-kettner.de>
Date: Mon Sep 24 14:13:42 2018 +0200
5510 FIX Add missing metrics for Windows Memory and Pagefile check
Memory and Pagefile average graphs are now displayed using the correct scaling and unit.
Change-Id: Ibd63ef11d5bdeac215421a40ad290c755286ad14
---
.werks/5510 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/.werks/5510 b/.werks/5510
new file mode 100644
index 0000000..a25679d
--- /dev/null
+++ b/.werks/5510
@@ -0,0 +1,11 @@
+Title: Add missing metrics for Windows Memory and Pagefile check
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1537791027
+
+Memory and Pagefile average graphs are now displayed using the correct scaling and unit.