Module: check_mk
Branch: master
Commit: 645f5d11840528d97d8ac09af89c65591ad6cff1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=645f5d11840528…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Apr 18 15:50:00 2013 +0200
uncommited is available even in VMFS - but maybe not in all versions, simply check if
available
---
checks/esx_vsphere_datastores | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/checks/esx_vsphere_datastores b/checks/esx_vsphere_datastores
index ce7d537..fafba17 100644
--- a/checks/esx_vsphere_datastores
+++ b/checks/esx_vsphere_datastores
@@ -67,9 +67,8 @@ def check_esx_vsphere_datastores(item, params, info):
state, infotext, perfdata = df_check_filesystem_single(
g_hostname, item, size_mb, avail_mb, params)
- #VMFS Stores has no field uncommitted
- if store['type'] == 'NFS':
- uncommitted_mb = store.get("uncommitted", 0.0) / 1024.0 / 1024.0
+ if 'uncommitted' in store:
+ uncommitted_mb = store["uncommitted"] / 1024.0 / 1024.0
used_mb = size_mb - avail_mb
overprov_mb = used_mb + uncommitted_mb
overprov_percent = (overprov_mb / size_mb) * 100