rename labels

This commit is contained in:
2026-02-02 15:28:54 +01:00
parent b68889e869
commit 8b19633a84
2 changed files with 18 additions and 12 deletions

View File

@@ -98,12 +98,12 @@ ERROR_COUNTER = Counter(
"redfish_errors_total", "Total Redfish errors", ["host", "error"]
)
VOLTAGE_GAUGE = Gauge(
"redfish_psu_line_input_voltage_volts",
"redfish_psu_input_voltage_volts",
"Line Input Voltage per PSU",
["host", "psu_serial", "group"],
)
WATTS_GAUGE = Gauge(
"redfish_psu_power_input_watts",
"redfish_psu_input_watts",
"Power Input Watts per PSU",
["host", "psu_serial", "group"],
)
@@ -553,8 +553,14 @@ async def get_system_info(session, host: HostConfig):
continue
manufacturer = system_data.get("Manufacturer")
if manufacturer is None:
manufacturer = "<no data>"
model = system_data.get("Model")
if model is None:
model = "<no data>"
serial_number = system_data.get("SerialNumber")
if serial_number is None:
serial_number = "<no data>"
# Hier könnte ihre Werbung stehen
SYSTEM_INFO.labels(host=host.fqdn, group=host.group).info(