Module: check_mk
Branch: master
Commit: 1505bc9033aab64632d272765c80235c77a3ead4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1505bc9033aab6…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jul 16 15:33:56 2015 +0200
#2406 FIX fileinfo: fixed missing size performance data for very large (e.g 2TB) files and
fileinfo groups
The fileinfo check failed to report the performance data value <i>size</i> for
very
large files. As a result the perfometer and graphs were broken.
---
.werks/2406 | 12 ++++++++++++
ChangeLog | 3 ++-
checks/fileinfo | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/2406 b/.werks/2406
new file mode 100644
index 0000000..02594c5
--- /dev/null
+++ b/.werks/2406
@@ -0,0 +1,12 @@
+Title: fileinfo: fixed missing size performance data for very large (e.g 2TB) files and
fileinfo groups
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437053468
+
+The fileinfo check failed to report the performance data value <i>size</i>
for very
+large files. As a result the perfometer and graphs were broken.
+
diff --git a/ChangeLog b/ChangeLog
index 01d16a6..bf7dd49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,7 +20,7 @@
* 1272 alcatel_power, alcatel_temp Support for stacked environments...
NOTE: Please refer to the migration notes!
* 1273 bvip_cams, bvip_fans, bvip_info, bvip_link, bvip_poe, bvip_temp, bvip_util,
bvip_video_alerts: New Checks for Bosch Video over IP Cameras
- * 2405 New checks for UCS bladecenter: ucs_bladecenter_topsystem,
ucs_bladecenter_faultinst...
+ * 2405 New checks for UCS bladecenter: ucs_bladecenter_topsystem,
ucs_bladecenter_faulinst...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
@@ -57,6 +57,7 @@
* 2402 FIX: netapp_api_disk: fixed broken WATO and check configuration...
* 2403 FIX: ibm_imm_fan: fixed exception with invalid formatted fan speed
information...
* 2404 FIX: apache_status: now able to handle BusyServers and IdleServers...
+ * 2406 FIX: fileinfo: fixed missing size performance data for very large (e.g 2TB)
files and fileinfo groups...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/fileinfo b/checks/fileinfo
index fbb92ca..e8cf6e2 100644
--- a/checks/fileinfo
+++ b/checks/fileinfo
@@ -218,7 +218,7 @@ def fileinfo_check_function(check_definition, params,
outof_range_txt):
perfdata = []
for what, val, verbfunc in check_definition:
infos.append("%s is %s" % (what, verbfunc(val)))
- if type(val) == int: # because strings go into infos but not into perfdata
+ if type(val) in [long, int]: # because strings go into infos but not into
perfdata
warn, crit = "", ""
for how, comp, cfunc in [ ("min", "<", operator.lt),
("max", ">", operator.gt) ]:
p = params.get(how + what)