Module: check_mk
Branch: master
Commit: d2905739dfa133ef85d8661bee660ed19cac7b8f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d2905739dfa133…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Apr 7 14:47:25 2014 +0200
FIX df: fixed problems on some filesystem checks when legacy check parameters where used
Any checks using the df.include library function had problems when their
check parameters where configured in a legacy syntax - in detail tuple(int, int)
This caused invalid output from Agent messages. However, a reinventory
of the check in question fixed the problems.
---
.werks/787 | 11 +++++++++++
ChangeLog | 1 +
checks/df.include | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/787 b/.werks/787
new file mode 100644
index 0000000..23285a7
--- /dev/null
+++ b/.werks/787
@@ -0,0 +1,11 @@
+Title: df: fixed problems on some filesystem checks when legacy check parameters where used
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1396874528
+Class: fix
+
+Any checks using the df.include library function had problems when their
+check parameters where configured in a legacy syntax - in detail tuple(int, int)
+This caused invalid output from Agent messages. However, a reinventory
+of the check in question fixed the problems.
diff --git a/ChangeLog b/ChangeLog
index a2f5784..8f140be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
+ * 0787 FIX: df: fixed problems on some filesystem checks when legacy check parameters where used...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/checks/df.include b/checks/df.include
index 987bf59..6f8a7a7 100644
--- a/checks/df.include
+++ b/checks/df.include
@@ -215,7 +215,7 @@ def get_filesystem_levels(host, mountpoint, size_gb, params):
crit_hr = get_bytes_human_readable(crit * mega)
levels["levels_text"] = "(%s %s/%s)" % (label, warn_hr, crit_hr)
- if params.get("inodes_levels"):
+ if "inodes_levels" in params:
if type(levels["inodes_levels"]) == tuple:
warn, crit = levels["inodes_levels"]
else:
Module: check_mk
Branch: master
Commit: ad36bd437a1422907494d23c753d9f831d3afbe9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad36bd437a1422…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Apr 7 09:41:00 2014 +0200
enterasys_cpu_util: Changed check to not longer summarize all modules
The check now not longer summarize the utilizations from the modules. Now each module becomes a owne check.
If you have allrady used this check before, please to a reinventory.
---
.werks/151 | 9 +++++++++
ChangeLog | 2 ++
checkman/enterasys_cpu_util | 4 ++--
checks/enterasys_cpu_util | 22 +++++++++++-----------
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/.werks/151 b/.werks/151
new file mode 100644
index 0000000..c93db3e
--- /dev/null
+++ b/.werks/151
@@ -0,0 +1,9 @@
+Title: enterasys_cpu_util: Changed check to not longer summarize all modules
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1396856292
+Class: incomp
+
+The check now not longer summarize the utilizations from the modules. Now each module becomes a owne check.
+If you have allrady used this check before, please to a reinventory.
diff --git a/ChangeLog b/ChangeLog
index 04328ff..3078739 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
* 0800 ibm_svc_nodestats.cache, ibm_svc_systemstats.cache: New checks for Cache Usage of IBM SVC / V7000 devices
* 0150 printer_suply: New option to upturn toner levels...
* 0801 ibm_svc_eventlog: New Check for Messages in Event log of IBM SVC / V7000 devices
+ * 0151 enterasys_cpu_util: Changed check to not longer summarize all modules...
+ NOTE: Please refer to the migration notes!
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/enterasys_cpu_util b/checkman/enterasys_cpu_util
index b8c19fe..ddccb8b 100644
--- a/checkman/enterasys_cpu_util
+++ b/checkman/enterasys_cpu_util
@@ -4,11 +4,11 @@ catalog: hw/network/enterasys
license: GPL
distribution: check_mk
description:
- This check shows the current average cpu utilization of all plugged-in CPU modules.
+ This check shows the current average cpu utilization for each plugged-in CPU modules.
inventory:
- One check will be created
+ One check per module will be created
perfdata:
The actual utilization, together with it's warn and crit levels
diff --git a/checks/enterasys_cpu_util b/checks/enterasys_cpu_util
index 94bda84..d35d41d 100644
--- a/checks/enterasys_cpu_util
+++ b/checks/enterasys_cpu_util
@@ -26,25 +26,25 @@
enterasys_cpu_default_levels = (90, 95)
def inventory_enterasys_cpu_util(info):
- return [ ( None, "enterasys_cpu_default_levels" )]
+ # [:-2] to remove the oid end
+ return [ ( x[0][:-2], "enterasys_cpu_default_levels" ) for x in info ]
-def check_enterasys_cpu_util(_no_item, params, info):
- util = 0
- for core_util in info:
- util += saveint(core_util[0]) / 10
- num_cpus = len(info)
- usage = util / num_cpus
- return check_cpu_util(usage, params)
+def check_enterasys_cpu_util( item, params, info):
+ for core, util in info:
+ if item == core[:-2]:
+ usage = saveint(util[0]) / 10
+ return check_cpu_util(usage, params)
+ return 3, "Core not found in agent Outut"
check_info["enterasys_cpu_util"] = {
"check_function" : check_enterasys_cpu_util,
"inventory_function" : inventory_enterasys_cpu_util,
- "service_description" : "CPU utilization",
- "snmp_info" : ( ".1.3.6.1.4.1.5624.1.2.49.1.1.1.1", [ 3 ]), #util in last 1min
+ "service_description" : "CPU util %s",
+ "snmp_info" : ( ".1.3.6.1.4.1.5624.1.2.49.1.1.1.1", [ OID_END, 3 ]), #util in last 1min
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5624.2.1"),
"has_perfdata" : True,
- "group" : "cpu_utilization",
+ "group" : "cpu_utilization_multiitem",
"includes" : [ "cpu_util.include" ],
}