Module: check_mk
Branch: master
Commit: e2b0c4a31d47bb93f6ba06f8183e8b660c2a7cff
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2b0c4a31d47bb…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Wed May 24 15:11:50 2017 +0200
4742 FIX wmi_cpuload: Added required tables to prevent crash
Until now the checkplugin created Services only if there are potential
instancesi regardless if the needed information to compute these instances
is available. This has been fixed now - Services are only created, if all
necessary data is available.
Change-Id: I6b97345b8c85d213c8299ba528e2b148a3d82f05
---
.werks/4742 | 13 +++++++++++++
checks/wmi_cpuload | 9 +++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/4742 b/.werks/4742
new file mode 100644
index 0000000..a71f219
--- /dev/null
+++ b/.werks/4742
@@ -0,0 +1,13 @@
+Title: wmi_cpuload: Added required tables to prevent crash
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1495631029
+Class: fix
+
+Until now the checkplugin created Services only if there are potential
+instancesi regardless if the needed information to compute these instances
+is available. This has been fixed now - Services are only created, if all
+necessary data is available.
diff --git a/checks/wmi_cpuload b/checks/wmi_cpuload
index e433a57..d120721 100644
--- a/checks/wmi_cpuload
+++ b/checks/wmi_cpuload
@@ -25,6 +25,11 @@
# Boston, MA 02110-1301 USA.
+def inventory_wmi_cpuload(parsed):
+ return inventory_wmi_table(parsed, \
+ required_tables = [ "computer_system", "system_perf" ])
+
+
def check_wmi_cpuload(item, params, parsed):
# the processor queue length is logically similar to linux cpu load as
# it states the number of processes waiting to be assigned cpu time.
@@ -51,9 +56,9 @@ def check_wmi_cpuload(item, params, parsed):
check_info['wmi_cpuload'] = {
- 'inventory_function' : inventory_wmi_table,
- 'check_function' : check_wmi_cpuload,
'parse_function' : parse_wmi_table,
+ 'inventory_function' : inventory_wmi_cpuload,
+ 'check_function' : check_wmi_cpuload,
'has_perfdata' : True,
'service_description' : "Processor Queue",
'includes' : ['wmi.include', 'cpu_load.include'],
Module: check_mk
Branch: master
Commit: 43b81dec459c3c16738599fb15384efb779f2bbc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=43b81dec459c3c…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed May 24 15:03:43 2017 +0200
4631 FIX cisco_ace_rserver: Fix broken IP address parsing
Due to a change in the way SNMP is handled by Check_MK between
versions 1.2.6 and 1.2.8, OIDs representing the IP address of
the interface would now no longer be parsed (crash-free but
incorrectly) and crash. This has been fixed.
Re-discovery is required if and only if neither a description
nor a name had been used as an item before.
Change-Id: Ie552fd9efed593bf718ebd9cd47561ece44789e2
---
.werks/4631 | 16 ++++++++++++++++
checks/cisco_ace_rserver | 28 +++++++++++++++++++++++-----
2 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/.werks/4631 b/.werks/4631
new file mode 100644
index 0000000..a78110b
--- /dev/null
+++ b/.werks/4631
@@ -0,0 +1,16 @@
+Title: cisco_ace_rserver: Fix broken IP address parsing
+Level: 1
+Component: checks
+Class: fix
+Compatible: incomp
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1495630510
+
+Due to a change in the way SNMP is handled by Check_MK between
+versions 1.2.6 and 1.2.8, OIDs representing the IP address of
+the interface would now no longer be parsed (crash-free but
+incorrectly) and crash. This has been fixed.
+Re-discovery is required if and only if neither a description
+nor a name had been used as an item before.
diff --git a/checks/cisco_ace_rserver b/checks/cisco_ace_rserver
index 49ae410..e23dc77 100644
--- a/checks/cisco_ace_rserver
+++ b/checks/cisco_ace_rserver
@@ -24,17 +24,34 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Parse an InetAddress type object as defined in the SNMP-FRAMEWORK-MIB
+def parse_framework_mib_inet_address(ip_address_type, ip_address):
+ if ip_address_type == 1:
+ return "%d.%d.%d.%d" % tuple(ip_address)
+ elif ip_address_type == 2:
+ return "%x:%x:%x:%x:%x:%x:%x:%x" % tuple(ip_address)
+ elif ip_address_type == 3:
+ return "%d.%d.%d.%d%%%d%d%d%d" % tuple(ip_address)
+ elif ip_address_type == 4:
+ return "%x:%x:%x:%x:%x:%x:%x:%x%%%d%d%d%d" % tuple(ip_address)
+ elif ip_address_type == 5: # Means DNS name - Reconvert to ASCII string
+ return "".join(map(chr,ip_address))
+ elif ip_address_type == 0: # Unknown address type - represent as hex string
+ return "".join(map(lambda byte: "%x" % byte, ip_address))
+
def inventory_cisco_ace_rserver(info):
- for name, ip, descr, admin_status, oper_status, conns in info:
+ for name, ip_address_type, ip_address, descr, admin_status, oper_status, conns in info:
+ ip = parse_framework_mib_inet_address(int(ip_address_type), ip_address)
if name != '':
item = name
elif descr != '':
item = descr
else:
- item = socket.inet_ntoa(ip)
+ ip
yield item, None
+
def check_cisco_ace_rserver(item, _no_params, info):
admin_stati = {
"1": "in service",
@@ -62,8 +79,8 @@ def check_cisco_ace_rserver(item, _no_params, info):
"18": (2, "max load reached"),
}
- for name, ip, descr, admin_status, oper_status, conns in info:
- ip_addr = socket.inet_ntoa(ip)
+ for name, ip_address_type, ip_address, descr, admin_status, oper_status, conns in info:
+ ip_addr = parse_framework_mib_inet_address(ip_address_type, ip_address)
if name == item or ip_addr == item or descr == item:
admin_state = admin_stati[admin_status]
state, state_txt = oper_stati[oper_status]
@@ -82,7 +99,8 @@ check_info['cisco_ace_rserver'] = {
"service_description" : "ACE RServer %s",
"snmp_info" : ( ".1.3.6.1.4.1.9.9.470.1.1.1.1", [ # cesRserverEntry
"1", # cesRserverName
- "4", # cesRserverIpAddress
+ "3", # cesRserverIpAddressType
+ BINARY("4"), # cesRserverIpAddress
"5", # cesRserverDescription
"12", # cesRserverAdminStatus
"13", # cesRserverOperStatus
Module: check_mk
Branch: master
Commit: 80c79eb9477cc1758850d19404f9a2bed3292c2a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80c79eb9477cc1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed May 24 12:55:28 2017 +0200
4748 FIX solaris_fmadm: Check was only discovered when an error is detected
Change-Id: Id48845e15c6c6caff8bd10b7e6af605dfb8b4f76
---
.werks/4748 | 11 +++++++++++
agents/check_mk_agent.solaris | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4748 b/.werks/4748
new file mode 100644
index 0000000..6868ed4
--- /dev/null
+++ b/.werks/4748
@@ -0,0 +1,11 @@
+Title: solaris_fmadm: Check was only discovered when an error is detected
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1495623301
+
+
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index dc4ec58..adacbaf 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -381,7 +381,7 @@ fi
# Displaying Information About Faults or Defects
# If there are no faults the output of this command will be empty.
-if type fmadm faulty > /dev/null 2>&1
+if type fmadm >/dev/null 2>&1
then
echo '<<<solaris_fmadm:sep(58)>>>'
fmadm faulty