Module: check_mk
Branch: master
Commit: f0da6aad0edc33996841056d0fcaa2394293d735
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f0da6aad0edc33…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 17 09:36:48 2015 +0200
esx_vsphere_counters: Fixed "NoneType object has no attribute" exception in
vsphere check and discovery
---
checks/esx_vsphere_counters | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/esx_vsphere_counters b/checks/esx_vsphere_counters
index 6cf392e..2267738 100644
--- a/checks/esx_vsphere_counters
+++ b/checks/esx_vsphere_counters
@@ -138,7 +138,7 @@ def esx_vsphere_counters_get_item_mapping(parsed):
for instance in parsed.get("datastore.read", {}).keys():
map_instance_to_item[instance] = instance
- for instance, values in parsed.get("datastore.name").items():
+ for instance, values in parsed.get("datastore.name", {}).items():
if instance in map_instance_to_item and values[0][0] != "":
map_instance_to_item[instance] = values[0][0].replace(" ",
"_")
return map_instance_to_item