mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
fixed prometheus metrics
This commit is contained in:
parent
1b9b27660a
commit
7394588279
@ -66,7 +66,7 @@ class ExportApi:
|
|||||||
self.__append_prometheus_rows(rows, atx_state["leds"]["power"], "pikvm_atx_power") # type: ignore
|
self.__append_prometheus_rows(rows, atx_state["leds"]["power"], "pikvm_atx_power") # type: ignore
|
||||||
|
|
||||||
for mode in sorted(UserGpioModes.ALL):
|
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
|
if not channel.startswith("__"): # Hide special GPIOs
|
||||||
for key in ["online", "state"]:
|
for key in ["online", "state"]:
|
||||||
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")
|
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user