Module: check_mk
Branch: master
Commit: 04054b28756dcc67cb377b54d6c8bd7df26c66c5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04054b28756dcc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 9 09:40:34 2015 +0200
fixed broken manpages
---
checkman/icom_repeater.pll_volt | 2 +-
checkman/jolokia_metrics.gc | 27 ++++++++++++++-------------
checkman/kaspersky_av_client | 12 +++---------
checkman/mcafee_av_client | 8 ++------
4 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/checkman/icom_repeater.pll_volt b/checkman/icom_repeater.pll_volt
index dc9f556..4fe5a4c 100644
--- a/checkman/icom_repeater.pll_volt
+++ b/checkman/icom_repeater.pll_volt
@@ -16,7 +16,7 @@ inventory:
One check per PLL is created.
[parameters]
- parameters(dict): This checks parameters are a dictionary with the
+parameters(dict): This checks parameters are a dictionary with the
(optional) keys {"rx"} and {"tx"}, under each of which lies a list of
tuples (frequency, (warn_lower, crit_lower, warn, crit)), where frequency is
the upper boundary of the frequency range for which the parameters
diff --git a/checkman/jolokia_metrics.gc b/checkman/jolokia_metrics.gc
index ef33f2d..0fd1dac 100644
--- a/checkman/jolokia_metrics.gc
+++ b/checkman/jolokia_metrics.gc
@@ -15,6 +15,9 @@ description:
To use this plugin, Jolokia and the agent plugin need to be installed
on the monitored server.
+ By default no levels are set because each virtual machine requires its own
+ individual parameters.
+
item:
The name of the application server instance and name of the garbage collection
as sent by the agent.
@@ -28,19 +31,17 @@ inventory:
One check is created per garbage collector sent by the Jolokia agent.
[parameters]
-Collection count
- warn (int): a WARN state is triggered by to many collections per minute
- crit (int): a CRITICAL state is triggered by to many collections per minute
-Collection time
- warn (int): a WARN state is triggered by assuming to many time for
+Tuple(int, int): Collection count
+
+ warn: a WARN state is triggered by to many collections per minute
+
+ crit: a CRITICAL state is triggered by to many collections per minute
+
+Tuple(int, int): Collection time
+
+ warn: a WARN state is triggered by assuming to many time for
collections per minute
- crit (int): a CRITICAL state is triggered by assuming to many time for
+
+ crit: a CRITICAL state is triggered by assuming to many time for
collections per minute
-[configuration]
-jolokia_metrics_gc_default_levels = {
- 'CollectionTime': (None, None),
- 'CollectionCount': (None, None)
- }
- By default no levels are set because each virtual machine requieres its own
- individual parameters.
diff --git a/checkman/kaspersky_av_client b/checkman/kaspersky_av_client
index 4dd4f13..5db6a17 100644
--- a/checkman/kaspersky_av_client
+++ b/checkman/kaspersky_av_client
@@ -17,15 +17,9 @@ inventory:
One checks is created for each windows host.
[parameters]
- parameters(dict): A dictionary with the following keys:
+parameters(dict): A dictionary with the following keys:
- { 'signature_age' } : A tuple of warn and crit,
- { 'fullscan_age' } : A tuple of warn and crit.
+ { 'signature_age' } : A tuple of warn and crit, default values are (86400, 7*86400)
-[configuration]
- kaspersky_av_client_default_levels(dict):
- Default levels, preset to {
- 'signature_age' : ( 86400, 7*86400),
- 'fullscan_age' : ( 86400, 7*86400)
- }
+ { 'fullscan_age' } : A tuple of warn and crit, default values are (86400, 7*86400)
diff --git a/checkman/mcafee_av_client b/checkman/mcafee_av_client
index 50ab1e6..808c185 100644
--- a/checkman/mcafee_av_client
+++ b/checkman/mcafee_av_client
@@ -16,10 +16,6 @@ inventory:
One check is created for each windows host.
[parameters]
- parameters(dict): A dictionary with the following keys:
+parameters(dict): A dictionary with the following key:
- { 'signature_age' } : A tuple of warn and crit.
-
-[configuration]
- mcafee_av_client_default_levels(dict):
- Default levels, preset to { 'levels' : ( 86400, 7*86400) }
+ { 'signature_age' } : A tuple of warn and crit, default values are (86400, 7*86400)
Module: check_mk
Branch: master
Commit: 073fd27f39632bd236f5919ab40bedf1b7c01a6f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=073fd27f39632b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 8 14:38:10 2015 +0200
#2673 FIX SNMP-Traps: Fixed translation of OIDs which are parts of trap values
Some traps send SNMP OIDs as values of traps which were not translated correctly
in the past. For example default SNMPv2 traps had a non-translated numeric OID
in the "Application" field of the events. This has now been changed to be
translated too.
Please note: If you already have created rules which refer to the numeric OIDs
while having trap translation enabled, you will need to update the rules.
---
.werks/2673 | 15 +++++++++++++++
ChangeLog | 2 ++
mkeventd/bin/mkeventd | 41 +++++++++++++++--------------------------
3 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/.werks/2673 b/.werks/2673
new file mode 100644
index 0000000..8176e33
--- /dev/null
+++ b/.werks/2673
@@ -0,0 +1,15 @@
+Title: SNMP-Traps: Fixed translation of OIDs which are parts of trap values
+Level: 1
+Component: ec
+Compatible: incomp
+Version: 1.2.7i3
+Date: 1444307734
+Class: fix
+
+Some traps send SNMP OIDs as values of traps which were not translated correctly
+in the past. For example default SNMPv2 traps had a non-translated numeric OID
+in the "Application" field of the events. This has now been changed to be
+translated too.
+
+Please note: If you already have created rules which refer to the numeric OIDs
+while having trap translation enabled, you will need to update the rules.
diff --git a/ChangeLog b/ChangeLog
index 2cd26f9..bc8ee0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -336,6 +336,8 @@
* 2534 FIX: Fixed implementation of skipping rule packs
* 2614 FIX: Fixed exception when processing events with umlaut in names from history
* 2644 FIX: Fix exception in executing actions or notifications when match groups contain non-ASCII characters
+ * 2673 FIX: SNMP-Traps: Fixed translation of OIDs which are parts of trap values...
+ NOTE: Please refer to the migration notes!
Livestatus:
* 2493 FIX: Fixed wrong JSON format when using stats queries together with header columns...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 611862b..3612007 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1212,32 +1212,14 @@ class EventServer:
def snmptrap_translate_varbinds(self, var_bind_list):
var_binds = []
for oid, value in var_bind_list:
- mib_var = MibVariable(oid).resolveWithMib(self._mib_resolver)
-
- if not mib_var.isFullyResolved():
- log('MIB for %s is not loaded' % oid.prettyPrint())
- var_binds.append((str(oid), value)) # add untranslated
- else:
- # MIB node object (like OBJECT-TYPE or other SMI MACROs)
- node = mib_var.getMibNode()
-
- mod, sym, indices = mib_var.getMibSymbol()
- # Only care about the first indice reported. Why should we care about multiple?
- # Do we have such cases here?
- if not indices:
- translated_oid = '%s::%s' % (mod, sym)
- else:
- translated_oid = '%s::%s.%s' % (mod, sym, indices[0].prettyPrint())
-
- # This MACRO supports SYNTAX clause?
- if hasattr(node, 'getSyntax'):
- # Cast value to MIB SYNTAX type (TEXTUAL-CONVENTION)
- value = node.getSyntax().clone(value)
- units = node.getUnits()
+ try:
+ mib_var = ObjectType(ObjectIdentity(oid), value).resolveWithMib(self._mib_resolver)
+ node = mib_var[0].getMibNode()
+ translated_oid = mib_var[0].prettyPrint().replace("\"", "")
+ translated_value = mib_var[1].prettyPrint()
- translated_value = value.prettyPrint() + ' ' + units
- else:
- translated_value = value
+ if hasattr(node, "getUnits"):
+ translated_value += ' ' + node.getUnits()
if hasattr(node, "getDescription") \
and type(g_config["translate_snmptraps"]) == tuple \
@@ -1245,6 +1227,12 @@ class EventServer:
translated_value += "(%s)" % node.getDescription()
var_binds.append((translated_oid, translated_value))
+
+ except SmiError, e:
+ # Failed to translate? add untranslated
+ log('Failed to translate OID %s: %s' % (oid.prettyPrint(), e))
+ var_binds.append((str(oid), str(value))) # add untranslated
+
return var_binds
def process_snmptrap(self, (whole_msg, (ipaddress, port))):
@@ -3851,9 +3839,10 @@ try:
from pyasn1.codec.ber import decoder as pyasn_decoder
import pysnmp.proto.proxy.rfc2576
# Needed for trap translation
- from pysnmp.entity.rfc3413.oneliner.mibvar import MibVariable
from pysnmp.smi.builder import MibBuilder, DirMibSource
from pysnmp.smi.view import MibViewController
+ from pysnmp.smi.rfc1902 import ObjectType, ObjectIdentity
+ from pysnmp.smi.error import SmiError
if not g_pipe_path:
bail_out("Please specify the path to the pipe (using -P).")