mirror of
https://gitlab.com/fabinfra/fabaccess/prometheus-exporter.git
synced 2024-12-22 12:33:48 +01:00
Fixed: Metric Name
This commit is contained in:
parent
bdf4c56f0b
commit
4dec3b3e91
4
main.py
4
main.py
@ -37,14 +37,14 @@ async def main():
|
|||||||
machine_list = machine_list.machine_list
|
machine_list = machine_list.machine_list
|
||||||
|
|
||||||
for machine in 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:
|
while True:
|
||||||
machine_list_new = await session.machineSystem.info.getMachineList().a_wait()
|
machine_list_new = await session.machineSystem.info.getMachineList().a_wait()
|
||||||
machine_list_new = machine_list_new.machine_list
|
machine_list_new = machine_list_new.machine_list
|
||||||
|
|
||||||
for machine in machine_list_new:
|
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)
|
await asyncio.sleep(polling_interval_seconds)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user