From caeb53616f121419b04d565d4a5cb4a79a9d06e1 Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Mon, 3 Feb 2025 16:25:23 +0800 Subject: [PATCH] grafana: ipmi: adopt for new setup --- monitoring/grafana/ipmi.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/monitoring/grafana/ipmi.yaml b/monitoring/grafana/ipmi.yaml index 366557b..9ebb143 100644 --- a/monitoring/grafana/ipmi.yaml +++ b/monitoring/grafana/ipmi.yaml @@ -16,8 +16,8 @@ spec: format='celsius', ).addTarget( grafana.prometheus.target( - 'label_replace(ipmi_temperature_celsius{name=~"T.*|CPU.*", name!~".*Prochot"}, "host", "$1", "instance", "([^.]+).*")', - legendFormat='{{host}} {{name}}' + 'ipmi_temperature_celsius{name=~"T.*|CPU.*", name!~".*Prochot"}', + legendFormat='{{instance}} {{name}}' ) ), gridPos={ x: 0, y: 0, w: 12, h: 8 }, @@ -29,8 +29,8 @@ spec: format='celsius', ).addTarget( grafana.prometheus.target( - 'label_replace(ipmi_temperature_celsius{name=~"(In|Ex|Amb).*"}, "host", "$1", "instance", "([^.]+).*")', - legendFormat='{{host}} {{name}}' + 'ipmi_temperature_celsius{name=~"(In|Ex|Amb).*"}', + legendFormat='{{instance}} {{name}}' ) ), gridPos={ x: 12, y: 0, w: 12, h: 8 }, @@ -41,7 +41,7 @@ spec: datasource='$DS_PROMETHEUS', ).addTarget( grafana.prometheus.target( - 'ipmi_fan_speed_rpm{job="ipmi-parto0"}', + 'ipmi_fan_speed_rpm{instance="parto"}', legendFormat='{{name}}' ) ), @@ -53,7 +53,7 @@ spec: datasource='$DS_PROMETHEUS', ).addTarget( grafana.prometheus.target( - 'ipmi_fan_speed_rpm{job="ipmi-parto1"}', + 'ipmi_fan_speed_rpm{instance="parto1"}', legendFormat='{{name}}' ) ), @@ -66,8 +66,8 @@ spec: format='watt', ).addTarget( grafana.prometheus.target( - 'label_replace(ipmi_power_watts, "host", "$1", "instance", "([^.]+).*")', - legendFormat='{{host}} {{name}}' + 'ipmi_power_watts', + legendFormat='{{instance}} {{name}}' ) ), gridPos={ x: 0, y: 16, w: 12, h: 8 }, @@ -79,8 +79,8 @@ spec: format='amp', ).addTarget( grafana.prometheus.target( - 'label_replace(ipmi_current_amperes, "host", "$1", "instance", "([^.]+).*")', - legendFormat='{{host}} {{name}}' + 'ipmi_current_amperes', + legendFormat='{{instance}} {{name}}' ) ), gridPos={ x: 12, y: 16, w: 12, h: 8 }, @@ -92,8 +92,8 @@ spec: format='volt', ).addTarget( grafana.prometheus.target( - 'label_replace(ipmi_voltage_volts, "host", "$1", "instance", "([^.]+).*")', - legendFormat='{{host}} {{name}}' + 'ipmi_voltage_volts', + legendFormat='{{instance}} {{name}}' ) ), gridPos={ x: 0, y: 24, w: 12, h: 8 }, -- 2.45.2