Module: check_mk
Branch: master
Commit: c3ac938878ff892bdc3dd4f62e12cc29c21cbc0a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c3ac938878ff89…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 6 10:11:22 2015 +0100
#2735 FIX esx_vsphere_datastores: fix labelling, help and performance data of provisioned
space
In the check output and the WATO texts for its configuration the words
<i>provisioning</i>
and <i>over provisioning</i> where mixed up. This has been fixed. Also in the
output
performance data the levels for WARN and CRIT have been corrected. Thanks to Marten
Vanraes.
---
.werks/2735 | 13 +++++++++++++
ChangeLog | 1 +
checks/esx_vsphere_datastores | 27 +++++++++++++--------------
web/plugins/wato/check_parameters.py | 9 ++++++---
4 files changed, 33 insertions(+), 17 deletions(-)
diff --git a/.werks/2735 b/.werks/2735
new file mode 100644
index 0000000..a9511ee
--- /dev/null
+++ b/.werks/2735
@@ -0,0 +1,13 @@
+Title: esx_vsphere_datastores: fix labelling, help and performance data of provisioned
space
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1446800972
+
+In the check output and the WATO texts for its configuration the words
<i>provisioning</i>
+and <i>over provisioning</i> where mixed up. This has been fixed. Also in the
output
+performance data the levels for WARN and CRIT have been corrected. Thanks to Marten
+Vanraes.
diff --git a/ChangeLog b/ChangeLog
index 219e99b..a8f4c60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
* 1300 FIX: ovs_bonding: Fixed discovery exception in case of not active bond
* 1301 FIX: cmciii: Some rewrites of the cmciii Temperature and Power Phase
Checks...
NOTE: Please refer to the migration notes!
+ * 2735 FIX: esx_vsphere_datastores: fix labelling, help and performance data of
provisioned space...
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/esx_vsphere_datastores b/checks/esx_vsphere_datastores
index ce2c373..d7b55e8 100644
--- a/checks/esx_vsphere_datastores
+++ b/checks/esx_vsphere_datastores
@@ -70,32 +70,31 @@ def check_esx_vsphere_datastores(item, params, info):
if 'uncommitted' in store:
uncommitted_mb = store["uncommitted"] / 1024.0 / 1024.0
used_mb = size_mb - avail_mb
- overprov_mb = used_mb + uncommitted_mb
+ prov_mb = used_mb + uncommitted_mb
if size_mb == 0:
- overprov_percent = 0
+ prov_percent = 0
else:
- overprov_percent = (overprov_mb / size_mb) * 100
+ prov_percent = (prov_mb / size_mb) * 100
- overprov_txt = ''
- overprov_warn_mb = None
- overprov_crit_mb = None
+ prov_txt = ''
if 'provisioning_levels' in params:
warn, crit = params['provisioning_levels']
- overprov_warn_mb = avail_mb / 100 * warn
- overprov_crit_mb = avail_mb / 100 * crit
- if overprov_percent >= crit:
+ levels_text = " (warn/crit at %.1f%%/%.1f%%)" % (warn, crit)
+ if prov_percent >= crit:
state = max(state, 2)
- overprov_txt = ' (!!)'
- elif overprov_percent >= warn:
+ prov_txt = levels_text + '(!!)'
+ elif prov_percent >= warn:
state = max(state, 1)
- overprov_txt = ' (!)'
+ prov_txt = levels_text + '(!)'
infotext += ", uncommitted: %.2f GB, provisioning: %.1f%%%s" % (
- uncommitted_mb / 1024, overprov_percent, overprov_txt)
+ uncommitted_mb / 1024, prov_percent, prov_txt)
if perfdata:
+ prov_warn_mb = size_mb / 100 * warn
+ prov_crit_mb = size_mb / 100 * crit
perfdata += [
('uncommitted', str(uncommitted_mb) + 'MB'),
- ('overprovisioned', str(overprov_mb) + 'MB',
overprov_warn_mb, overprov_crit_mb),
+ ('overprovisioned', str(prov_mb) + 'MB', prov_warn_mb,
prov_crit_mb),
]
if not store["accessible"]:
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index b153f59..62c5e79 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3059,10 +3059,13 @@ register_check_parameters(
elements = filesystem_elements + [
("provisioning_levels", Tuple(
title = _("Provisioning Levels"),
- help = _("Configure thresholds for overprovisioning of
datastores."),
+ help = _("A provisioning of more than 100% is called "
+ "over provisioning and can be a useful strategy for saving
disk space. But you cannot guarantee "
+ "any longer that every VM can really use all space that it
was assigned. Here you can "
+ "set levels for the maximum provisioning. A warning level
of 150% will warn at 50% over provisioning."),
elements = [
- Percentage(title = _("Warning at overprovisioning of"),
maxvalue = None),
- Percentage(title = _("Critical at overprovisioning of"),
maxvalue = None),
+ Percentage(title = _("Warning at a provisioning of"),
maxvalue = None, default_value = 120.0),
+ Percentage(title = _("Critical at a provisioning of"),
maxvalue = None, default_value = 150.0),
]
)),
],