From 7f80cdf3cb4885cb462628d10dbfafceb759a654 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Thu, 23 Mar 2023 12:35:21 -0400 Subject: [PATCH] Update python-node-exporter.py im stupid :) --- app/python-node-exporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/python-node-exporter.py b/app/python-node-exporter.py index 9293401..62c18e2 100644 --- a/app/python-node-exporter.py +++ b/app/python-node-exporter.py @@ -332,7 +332,8 @@ def GetDataFunc(): ## VMs API log.debug("Getting VMs API") uri = "https://" + zvm_url + ":" + zvm_port + "/v1/vms/" - + + vmapi_json = {} try: vmapi = requests.get(url=uri, timeout=3, headers=h2, verify=verifySSL) vmapi_json = vmapi.json() @@ -342,6 +343,7 @@ def GetDataFunc(): return log.debug("Got VMs API") + log.debug(vmapi_json) for vm in vmapi_json : metricsDictionary["vm_actualrpo{VmIdentifier=\"" + vm['VmIdentifier'] + "\",VmName=\"" + vm['VmName'] + "\",VmRecoveryVRA=\"" + vm["RecoveryHostName"] + "\",VmPriority=\"" + str(vm['Priority']) + "\",SiteIdentifier=\"" + siteId + "\",SiteName=\"" + siteName + "\"}"] = vm["ActualRPO"] metricsDictionary["vm_throughput_in_mb{VmIdentifier=\"" + vm['VmIdentifier'] + "\",VmName=\"" + vm['VmName'] + "\",VmRecoveryVRA=\"" + vm["RecoveryHostName"] + "\",VmPriority=\"" + str(vm['Priority']) + "\",SiteIdentifier=\"" + siteId + "\",SiteName=\"" + siteName + "\"}"] = vm["ThroughputInMB"]