From db3535dfddc87b4cbcc717bdd9480f3625faef72 Mon Sep 17 00:00:00 2001 From: Koos85 Date: Fri, 3 Feb 2023 20:35:06 +0100 Subject: [PATCH] typo. fix perf --- lib/check/host_vms.py | 5 ++++- lib/version.py | 2 +- lib/vmwareconn.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/check/host_vms.py b/lib/check/host_vms.py index 076e298..a6c6da4 100644 --- a/lib/check/host_vms.py +++ b/lib/check/host_vms.py @@ -239,7 +239,10 @@ async def check_host_vms( info_dct['cpuReadiness'] = max(values) / 20_000 * 100 # number of disk bus reset commands by the virtual machine path = ('disk', 'busResets') - info_dct['busResets'] = sum(perf[path].values()) + info_dct['busResets'] = sum( + sum(values) + for values in perf[path].values() + ) guests.append(info_dct) diff --git a/lib/version.py b/lib/version.py index ec7bd83..662c1ef 100644 --- a/lib/version.py +++ b/lib/version.py @@ -1,4 +1,4 @@ # Version string. Examples: # '3.0.0' # '3.0.0-alpha1' -__version__ = '3.0.0-alpha12' +__version__ = '3.0.0-alpha13' diff --git a/lib/vmwareconn.py b/lib/vmwareconn.py index 8d4b2e1..1f8b96d 100644 --- a/lib/vmwareconn.py +++ b/lib/vmwareconn.py @@ -56,7 +56,7 @@ def get_perf(ip4, username, password, obj_type, metrics, interval): start_time = content_time - timedelta(seconds=interval + 1) spec = vim.PerformanceManager.QuerySpec(intervalId=20, entity=child, - etricId=metric_id, + metricId=metric_id, startTime=start_time, endTime=end_time) results[child.config.instanceUuid] = result = {m: {} for m in metrics}