Module: check_mk
Branch: master
Commit: 0a0b9a22b65968ff4c23c9c750e462bbd2685a42
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a0b9a22b65968…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 10 17:05:55 2013 +0200
esx_vsphere_datastores: Fix exception if uncommitted is missing
---
checks/esx_vsphere_datastores | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/checks/esx_vsphere_datastores b/checks/esx_vsphere_datastores
index 1893635..5eabe63 100644
--- a/checks/esx_vsphere_datastores
+++ b/checks/esx_vsphere_datastores
@@ -69,7 +69,7 @@ def check_esx_vsphere_datastores(item, params, info):
#VMFS Stores has no field uncommitted
if store['type'] == 'NFS':
- uncommitted_mb = store["uncommitted"] / 1024.0 / 1024.0
+ uncommitted_mb = store.get("uncommitted", 0.0) / 1024.0 / 1024.0
used_mb = size_mb - avail_mb
overprov_mb = used_mb + uncommitted_mb
overprov_percent = (overprov_mb / size_mb) * 100