summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-11-25 05:26:03 +0200
committerMaxim Devaev <[email protected]>2024-11-25 05:26:03 +0200
commit7394588279129bba8942323867a65bbc950d1396 (patch)
treed09197537f6aeefad8d6f6c3821e25c2d069d3a0
parent1b9b27660aca79eadf975883d7a377a74106d7f0 (diff)
fixed prometheus metrics
-rw-r--r--kvmd/apps/kvmd/api/export.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvmd/apps/kvmd/api/export.py b/kvmd/apps/kvmd/api/export.py
index bb048f53..fd672f7b 100644
--- a/kvmd/apps/kvmd/api/export.py
+++ b/kvmd/apps/kvmd/api/export.py
@@ -66,7 +66,7 @@ class ExportApi:
self.__append_prometheus_rows(rows, atx_state["leds"]["power"], "pikvm_atx_power") # type: ignore
for mode in sorted(UserGpioModes.ALL):
- for (channel, ch_state) in gpio_state[f"{mode}s"].items(): # type: ignore
+ for (channel, ch_state) in gpio_state["state"][f"{mode}s"].items(): # type: ignore
if not channel.startswith("__"): # Hide special GPIOs
for key in ["online", "state"]:
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")