Module: check_mk
Branch: master
Commit: c81d03fb40e12bb1f8521193b34518cb2c11ed94
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c81d03fb40e12b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 5 15:19:46 2013 +0200
esx_vsphere_datastores: Fix incomplete performance data
---
ChangeLog | 1 +
checks/esx_vsphere_datastores | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f2c676b..3192df3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* cached checks: no longer output cached data if the age of the
cache file is twice the maximum cache age
* windows agent: no longer tries to execute directories
+ * esx_vsphere_datastores: Fix incomplete performance data
Notifications:
* Flexible Notification can now filter service levels
diff --git a/checks/esx_vsphere_datastores b/checks/esx_vsphere_datastores
index 4d2c885..40c6900 100644
--- a/checks/esx_vsphere_datastores
+++ b/checks/esx_vsphere_datastores
@@ -89,10 +89,11 @@ def check_esx_vsphere_datastores(item, params, info):
infotext += ", uncommitted: %.2f GB, provisioning: %.1f%%%s" % (
uncommitted_mb / 1024, overprov_percent, overprov_txt)
- perfdata += [
- ('uncommitted', str(uncommitted_mb) + 'MB'),
- ('overprovisioned', str(overprov_mb) + 'MB',
overprov_warn_mb, overprov_crit_mb),
- ]
+ if perfdata:
+ perfdata += [
+ ('uncommitted', str(uncommitted_mb) + 'MB'),
+ ('overprovisioned', str(overprov_mb) + 'MB',
overprov_warn_mb, overprov_crit_mb),
+ ]
if not store["accessible"]:
state = 2