mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
prometheus: hid special gpios starting with __
This commit is contained in:
parent
61ce81ab64
commit
07e1c601a9
@ -68,6 +68,7 @@ class ExportApi:
|
|||||||
|
|
||||||
for mode in sorted(UserGpioModes.ALL):
|
for mode in sorted(UserGpioModes.ALL):
|
||||||
for (channel, ch_state) in gpio_state[f"{mode}s"].items():
|
for (channel, ch_state) in gpio_state[f"{mode}s"].items():
|
||||||
|
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