From 4dec3b3e919174dbfa994deb42f9f61c230dd5d7 Mon Sep 17 00:00:00 2001 From: TheJoKlLa Date: Tue, 7 Feb 2023 04:59:22 +0100 Subject: [PATCH] Fixed: Metric Name --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5be72a3..b918b18 100644 --- a/main.py +++ b/main.py @@ -37,14 +37,14 @@ async def main(): machine_list = machine_list.machine_list for machine in machine_list: - metriclist[machine.name] = Gauge("bffh_machine_" + machine.name + "_state", "Machine State") + metriclist[machine.id] = Gauge("bffh_machine_" + machine.id + "_state", "Machine State") while True: machine_list_new = await session.machineSystem.info.getMachineList().a_wait() machine_list_new = machine_list_new.machine_list for machine in machine_list_new: - metriclist[machine.name].set(convert2int(machine.state)) + metriclist[machine.id].set(convert2int(machine.state)) await asyncio.sleep(polling_interval_seconds)