mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 10:01:53 +08:00
prometheus: hid special gpios starting with __
This commit is contained in:
@@ -68,8 +68,9 @@ 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():
|
||||||
for key in ["online", "state"]:
|
if not channel.startswith("__"): # Hide special GPIOs
|
||||||
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")
|
for key in ["online", "state"]:
|
||||||
|
self.__append_prometheus_rows(rows, ch_state["state"], f"pikvm_gpio_{mode}_{key}_{channel}")
|
||||||
|
|
||||||
self.__append_prometheus_rows(rows, hw_state["health"], "pikvm_hw")
|
self.__append_prometheus_rows(rows, hw_state["health"], "pikvm_hw")
|
||||||
self.__append_prometheus_rows(rows, fan_state, "pikvm_fan")
|
self.__append_prometheus_rows(rows, fan_state, "pikvm_fan")
|
||||||
|
|||||||
Reference in New Issue
Block a user