From 496f7a12dd6231d7e60d10203177c7a31ffd4a00 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Tue, 14 Apr 2026 00:31:38 -0300 Subject: [PATCH] monitoring(overview): dedupe typhon series and map fans by port --- scripts/dashboards_render_atlas.py | 49 ++++++++++--------- .../monitoring/dashboards/atlas-overview.json | 44 ++++++++--------- .../monitoring/dashboards/atlas-power.json | 32 ++++++------ .../grafana-dashboard-overview.yaml | 44 ++++++++--------- .../monitoring/grafana-dashboard-power.yaml | 32 ++++++------ 5 files changed, 102 insertions(+), 99 deletions(-) diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index 9d8ec7b3..daee80bc 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -689,7 +689,10 @@ ANANKE_UPS_DISCHARGE_RISK_TETHYS = ups_discharge_risk_expr( ANANKE_UPS_THRESHOLD_TETHYS, ) CLIMATE_SENSOR_COUNT = "count(typhon_temperature_celsius) or on() vector(0)" -CLIMATE_DEDUP_LABELS = "job,instance,pod,service,endpoint,namespace" +# Drop volatile labels so historical series stay merged when controller naming/group metadata changes. +CLIMATE_DEDUP_LABELS = ( + "job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group" +) CLIMATE_TEMP_SERIES = ( f"max without ({CLIMATE_DEDUP_LABELS}) (typhon_temperature_celsius != 0)" ) @@ -719,28 +722,28 @@ CLIMATE_PRESSURE_MAX_BOUND_SERIES = ( f"(max_over_time({CLIMATE_PRESSURE_SERIES}[$__range]) + 0.03)" ) CLIMATE_FAN_OUTLET_CURRENT = ( - f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="outlet"}})) or on() vector(0)' + f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="1"}})) or on() vector(0)' ) CLIMATE_FAN_INSIDE_INLET_CURRENT = ( - f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="inside_inlet"}})) or on() vector(0)' + f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="2"}})) or on() vector(0)' ) CLIMATE_FAN_OUTSIDE_INLET_CURRENT = ( - f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="outside_inlet"}})) or on() vector(0)' + f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="3"}})) or on() vector(0)' ) CLIMATE_FAN_INTERIOR_CURRENT = ( - f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group=~"interior|unknown"}})) or on() vector(0)' + f'max(max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="4"}})) or on() vector(0)' ) CLIMATE_FAN_OUTLET_SERIES = ( - f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="outlet"}})' + f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="1"}})' ) CLIMATE_FAN_INSIDE_INLET_SERIES = ( - f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="inside_inlet"}})' + f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="2"}})' ) CLIMATE_FAN_OUTSIDE_INLET_SERIES = ( - f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group="outside_inlet"}})' + f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="3"}})' ) CLIMATE_FAN_INTERIOR_SERIES = ( - f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{fan_group=~"interior|unknown"}})' + f'max without ({CLIMATE_DEDUP_LABELS}) (typhon_fan_speed_level{{port="4"}})' ) @@ -768,8 +771,8 @@ CLIMATE_CURRENT_ROW_EXPR = " or ".join( CLIMATE_FAN_CURRENT_ROW_EXPR = " or ".join( [ with_metric_label(f"round({CLIMATE_FAN_OUTLET_CURRENT})", "Outlet"), - with_metric_label(f"round({CLIMATE_FAN_INSIDE_INLET_CURRENT})", "Inlet In"), - with_metric_label(f"round({CLIMATE_FAN_OUTSIDE_INLET_CURRENT})", "Inlet Out"), + with_metric_label(f"round({CLIMATE_FAN_INSIDE_INLET_CURRENT})", "Inlet - Inside"), + with_metric_label(f"round({CLIMATE_FAN_OUTSIDE_INLET_CURRENT})", "Inlet - Outside"), with_metric_label(f"round({CLIMATE_FAN_INTERIOR_CURRENT})", "Interior"), ] ) @@ -2171,8 +2174,8 @@ def build_overview(): }, field_overrides=[ {"matcher": {"id": "byName", "options": "Outlet"}, "properties": [{"id": "decimals", "value": 0}]}, - {"matcher": {"id": "byName", "options": "Inlet In"}, "properties": [{"id": "decimals", "value": 0}]}, - {"matcher": {"id": "byName", "options": "Inlet Out"}, "properties": [{"id": "decimals", "value": 0}]}, + {"matcher": {"id": "byName", "options": "Inlet - Inside"}, "properties": [{"id": "decimals", "value": 0}]}, + {"matcher": {"id": "byName", "options": "Inlet - Outside"}, "properties": [{"id": "decimals", "value": 0}]}, {"matcher": {"id": "byName", "options": "Interior"}, "properties": [{"id": "decimals", "value": 0}]}, ], links=link_to("atlas-power"), @@ -2190,10 +2193,10 @@ def build_overview(): unit="none", max_value=10, targets=[ - {"refId": "A", "expr": CLIMATE_FAN_OUTLET_SERIES, "legendFormat": "Inside Outlet"}, - {"refId": "B", "expr": CLIMATE_FAN_INSIDE_INLET_SERIES, "legendFormat": "Inside Inlet"}, - {"refId": "C", "expr": CLIMATE_FAN_OUTSIDE_INLET_SERIES, "legendFormat": "Outside Inlet"}, - {"refId": "D", "expr": CLIMATE_FAN_INTERIOR_SERIES, "legendFormat": "Interior Fans"}, + {"refId": "A", "expr": CLIMATE_FAN_OUTLET_SERIES, "legendFormat": "Outlet"}, + {"refId": "B", "expr": CLIMATE_FAN_INSIDE_INLET_SERIES, "legendFormat": "Inlet - Inside"}, + {"refId": "C", "expr": CLIMATE_FAN_OUTSIDE_INLET_SERIES, "legendFormat": "Inlet - Outside"}, + {"refId": "D", "expr": CLIMATE_FAN_INTERIOR_SERIES, "legendFormat": "Interior"}, ], legend_display="table", legend_placement="right", @@ -4346,8 +4349,8 @@ def build_power_dashboard(): }, field_overrides=[ {"matcher": {"id": "byName", "options": "Outlet"}, "properties": [{"id": "decimals", "value": 0}]}, - {"matcher": {"id": "byName", "options": "Inlet In"}, "properties": [{"id": "decimals", "value": 0}]}, - {"matcher": {"id": "byName", "options": "Inlet Out"}, "properties": [{"id": "decimals", "value": 0}]}, + {"matcher": {"id": "byName", "options": "Inlet - Inside"}, "properties": [{"id": "decimals", "value": 0}]}, + {"matcher": {"id": "byName", "options": "Inlet - Outside"}, "properties": [{"id": "decimals", "value": 0}]}, {"matcher": {"id": "byName", "options": "Interior"}, "properties": [{"id": "decimals", "value": 0}]}, ], orientation="vertical", @@ -4364,10 +4367,10 @@ def build_power_dashboard(): unit="none", max_value=10, targets=[ - {"refId": "A", "expr": CLIMATE_FAN_OUTLET_SERIES, "legendFormat": "Inside Outlet"}, - {"refId": "B", "expr": CLIMATE_FAN_INSIDE_INLET_SERIES, "legendFormat": "Inside Inlet"}, - {"refId": "C", "expr": CLIMATE_FAN_OUTSIDE_INLET_SERIES, "legendFormat": "Outside Inlet"}, - {"refId": "D", "expr": CLIMATE_FAN_INTERIOR_SERIES, "legendFormat": "Interior Fans"}, + {"refId": "A", "expr": CLIMATE_FAN_OUTLET_SERIES, "legendFormat": "Outlet"}, + {"refId": "B", "expr": CLIMATE_FAN_INSIDE_INLET_SERIES, "legendFormat": "Inlet - Inside"}, + {"refId": "C", "expr": CLIMATE_FAN_OUTSIDE_INLET_SERIES, "legendFormat": "Inlet - Outside"}, + {"refId": "D", "expr": CLIMATE_FAN_INTERIOR_SERIES, "legendFormat": "Interior"}, ], legend_display="table", legend_placement="right", diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index ae1c747e..e4114963 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1336,7 +1336,7 @@ }, "targets": [ { - "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) or on() vector(0), \"metric\", \"\u00b0C\", \"__name__\", \".*\") or label_replace(max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0), \"metric\", \"\u00b0F\", \"__name__\", \".*\")", + "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0), \"metric\", \"\u00b0C\", \"__name__\", \".*\") or label_replace(max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0), \"metric\", \"\u00b0F\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1430,7 +1430,7 @@ }, "targets": [ { - "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)) or on() vector(0), \"metric\", \"%RH\", \"__name__\", \".*\") or label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)) or on() vector(0), \"metric\", \"kPa\", \"__name__\", \".*\")", + "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0), \"metric\", \"%RH\", \"__name__\", \".*\") or label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0), \"metric\", \"kPa\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1525,47 +1525,47 @@ "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)", "legendFormat": "C" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)", "legendFormat": "RH" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "legendFormat": "P" }, { "refId": "D", - "expr": "(min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)[$__range]) - 0.08)", + "expr": "(min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)[$__range]) - 0.08)", "legendFormat": "C bound min" }, { "refId": "E", - "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)[$__range]) + 0.08)", + "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)[$__range]) + 0.08)", "legendFormat": "C bound max" }, { "refId": "F", - "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)[$__range]) - 0.35), 0)", + "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)[$__range]) - 0.35), 0)", "legendFormat": "RH bound min" }, { "refId": "G", - "expr": "clamp_max((max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)[$__range]) + 0.35), 100)", + "expr": "clamp_max((max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)[$__range]) + 0.35), 100)", "legendFormat": "RH bound max" }, { "refId": "H", - "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)[$__range]) - 0.03), 0)", + "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)[$__range]) - 0.03), 0)", "legendFormat": "P bound min" }, { "refId": "I", - "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)[$__range]) + 0.03)", + "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)[$__range]) + 0.03)", "legendFormat": "P bound max" } ], @@ -1831,7 +1831,7 @@ }, "targets": [ { - "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", + "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - Inside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Outside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1882,7 +1882,7 @@ { "matcher": { "id": "byName", - "options": "Inlet In" + "options": "Inlet - Inside" }, "properties": [ { @@ -1894,7 +1894,7 @@ { "matcher": { "id": "byName", - "options": "Inlet Out" + "options": "Inlet - Outside" }, "properties": [ { @@ -1960,23 +1960,23 @@ "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})", - "legendFormat": "Inside Outlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", + "legendFormat": "Outlet" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})", - "legendFormat": "Inside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", + "legendFormat": "Inlet - Inside" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})", - "legendFormat": "Outside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", + "legendFormat": "Inlet - Outside" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})", - "legendFormat": "Interior Fans" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", + "legendFormat": "Interior" } ], "fieldConfig": { diff --git a/services/monitoring/dashboards/atlas-power.json b/services/monitoring/dashboards/atlas-power.json index a8ce6cdf..bdc1c2c7 100644 --- a/services/monitoring/dashboards/atlas-power.json +++ b/services/monitoring/dashboards/atlas-power.json @@ -163,7 +163,7 @@ }, "targets": [ { - "expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")", + "expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -283,22 +283,22 @@ "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", + "expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", "legendFormat": "Temperature (\u00b0F)" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)", "legendFormat": "Humidity (%)" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "legendFormat": "Pressure (VPD kPa)" } ], @@ -424,7 +424,7 @@ }, "targets": [ { - "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", + "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - Inside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Outside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -475,7 +475,7 @@ { "matcher": { "id": "byName", - "options": "Inlet In" + "options": "Inlet - Inside" }, "properties": [ { @@ -487,7 +487,7 @@ { "matcher": { "id": "byName", - "options": "Inlet Out" + "options": "Inlet - Outside" }, "properties": [ { @@ -544,23 +544,23 @@ "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})", - "legendFormat": "Inside Outlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", + "legendFormat": "Outlet" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})", - "legendFormat": "Inside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", + "legendFormat": "Inlet - Inside" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})", - "legendFormat": "Outside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", + "legendFormat": "Inlet - Outside" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})", - "legendFormat": "Interior Fans" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", + "legendFormat": "Interior" } ], "fieldConfig": { diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index 45e2f4be..740131a5 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1345,7 +1345,7 @@ data: }, "targets": [ { - "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) or on() vector(0), \"metric\", \"\u00b0C\", \"__name__\", \".*\") or label_replace(max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0), \"metric\", \"\u00b0F\", \"__name__\", \".*\")", + "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0), \"metric\", \"\u00b0C\", \"__name__\", \".*\") or label_replace(max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0), \"metric\", \"\u00b0F\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1439,7 +1439,7 @@ data: }, "targets": [ { - "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)) or on() vector(0), \"metric\", \"%RH\", \"__name__\", \".*\") or label_replace(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)) or on() vector(0), \"metric\", \"kPa\", \"__name__\", \".*\")", + "expr": "label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0), \"metric\", \"%RH\", \"__name__\", \".*\") or label_replace(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0), \"metric\", \"kPa\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1534,47 +1534,47 @@ data: "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)", "legendFormat": "C" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)", "legendFormat": "RH" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "legendFormat": "P" }, { "refId": "D", - "expr": "(min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)[$__range]) - 0.08)", + "expr": "(min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)[$__range]) - 0.08)", "legendFormat": "C bound min" }, { "refId": "E", - "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)[$__range]) + 0.08)", + "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)[$__range]) + 0.08)", "legendFormat": "C bound max" }, { "refId": "F", - "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)[$__range]) - 0.35), 0)", + "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)[$__range]) - 0.35), 0)", "legendFormat": "RH bound min" }, { "refId": "G", - "expr": "clamp_max((max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)[$__range]) + 0.35), 100)", + "expr": "clamp_max((max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)[$__range]) + 0.35), 100)", "legendFormat": "RH bound max" }, { "refId": "H", - "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)[$__range]) - 0.03), 0)", + "expr": "clamp_min((min_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)[$__range]) - 0.03), 0)", "legendFormat": "P bound min" }, { "refId": "I", - "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)[$__range]) + 0.03)", + "expr": "(max_over_time(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)[$__range]) + 0.03)", "legendFormat": "P bound max" } ], @@ -1840,7 +1840,7 @@ data: }, "targets": [ { - "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", + "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - Inside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Outside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -1891,7 +1891,7 @@ data: { "matcher": { "id": "byName", - "options": "Inlet In" + "options": "Inlet - Inside" }, "properties": [ { @@ -1903,7 +1903,7 @@ data: { "matcher": { "id": "byName", - "options": "Inlet Out" + "options": "Inlet - Outside" }, "properties": [ { @@ -1969,23 +1969,23 @@ data: "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})", - "legendFormat": "Inside Outlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", + "legendFormat": "Outlet" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})", - "legendFormat": "Inside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", + "legendFormat": "Inlet - Inside" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})", - "legendFormat": "Outside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", + "legendFormat": "Inlet - Outside" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})", - "legendFormat": "Interior Fans" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", + "legendFormat": "Interior" } ], "fieldConfig": { diff --git a/services/monitoring/grafana-dashboard-power.yaml b/services/monitoring/grafana-dashboard-power.yaml index 2ad454c1..a9d86fc8 100644 --- a/services/monitoring/grafana-dashboard-power.yaml +++ b/services/monitoring/grafana-dashboard-power.yaml @@ -172,7 +172,7 @@ data: }, "targets": [ { - "expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")", + "expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -292,22 +292,22 @@ data: "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", + "expr": "(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_temperature_celsius != 0)) * 9 / 5 + 32", "legendFormat": "Temperature (\u00b0F)" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_relative_humidity_percent != 0)", "legendFormat": "Humidity (%)" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa != 0)", + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_vpd_kpa != 0)", "legendFormat": "Pressure (VPD kPa)" } ], @@ -433,7 +433,7 @@ data: }, "targets": [ { - "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet In\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})) or on() vector(0))), \"metric\", \"Inlet Out\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", + "expr": "label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})) or on() vector(0))), \"metric\", \"Outlet\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})) or on() vector(0))), \"metric\", \"Inlet - Inside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})) or on() vector(0))), \"metric\", \"Inlet - Outside\", \"__name__\", \".*\") or label_replace((round(max(max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})) or on() vector(0))), \"metric\", \"Interior\", \"__name__\", \".*\")", "refId": "A", "legendFormat": "{{metric}}", "instant": true @@ -484,7 +484,7 @@ data: { "matcher": { "id": "byName", - "options": "Inlet In" + "options": "Inlet - Inside" }, "properties": [ { @@ -496,7 +496,7 @@ data: { "matcher": { "id": "byName", - "options": "Inlet Out" + "options": "Inlet - Outside" }, "properties": [ { @@ -553,23 +553,23 @@ data: "targets": [ { "refId": "A", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outlet\"})", - "legendFormat": "Inside Outlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"1\"})", + "legendFormat": "Outlet" }, { "refId": "B", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"inside_inlet\"})", - "legendFormat": "Inside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"2\"})", + "legendFormat": "Inlet - Inside" }, { "refId": "C", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=\"outside_inlet\"})", - "legendFormat": "Outside Inlet" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"3\"})", + "legendFormat": "Inlet - Outside" }, { "refId": "D", - "expr": "max without (job,instance,pod,service,endpoint,namespace) (typhon_fan_speed_level{fan_group=~\"interior|unknown\"})", - "legendFormat": "Interior Fans" + "expr": "max without (job,instance,pod,service,endpoint,namespace,controller_name,port_name,fan_group) (typhon_fan_speed_level{port=\"4\"})", + "legendFormat": "Interior" } ], "fieldConfig": {