From a20fd995a120829a6dfe0d97a0fbb26b4a7b87c4 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 12 Apr 2026 17:20:05 -0300 Subject: [PATCH] monitoring: switch climate dashboards to typhon metrics --- scripts/dashboards_render_atlas.py | 40 +++++++------------ .../monitoring/dashboards/atlas-overview.json | 24 +++++------ .../monitoring/dashboards/atlas-power.json | 24 +++++------ .../grafana-dashboard-overview.yaml | 24 +++++------ .../monitoring/grafana-dashboard-power.yaml | 24 +++++------ 5 files changed, 62 insertions(+), 74 deletions(-) diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index ca99bf98..575b4326 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -542,47 +542,35 @@ ANANKE_UPS_RUNTIME_BY_SOURCE = f"ananke_ups_runtime_seconds{{{ANANKE_SELECTOR}}} ANANKE_UPS_LOAD_BY_SOURCE = f"ananke_ups_load_percent{{{ANANKE_SELECTOR}}}" ANANKE_UPS_CHARGE_BY_SOURCE = f"ananke_ups_battery_charge_percent{{{ANANKE_SELECTOR}}}" ANANKE_UPS_TRIGGER_BY_SOURCE = f"ananke_ups_trigger_active{{{ANANKE_SELECTOR}}}" -CLIMATE_SENSOR_COUNT = "count(atlas_climate_temperature_celsius) or on() vector(0)" -CLIMATE_TEMP_MAX = "max(atlas_climate_tent_temperature_celsius) or max(atlas_climate_temperature_celsius) or on() vector(0)" -CLIMATE_PRESSURE_CURRENT = "max(atlas_climate_tent_pressure_kpa) or max(atlas_climate_pressure_kpa) or on() vector(0)" -CLIMATE_HUMIDITY_MAX = "max(atlas_climate_humidity_percent) or on() vector(0)" -CLIMATE_TEMP_SERIES = "(atlas_climate_tent_temperature_celsius or atlas_climate_temperature_celsius)" -CLIMATE_PRESSURE_SERIES = "(atlas_climate_tent_pressure_kpa or atlas_climate_pressure_kpa)" +CLIMATE_SENSOR_COUNT = "count(typhon_temperature_celsius) or on() vector(0)" +CLIMATE_TEMP_MAX = "max(typhon_temperature_celsius) or on() vector(0)" +CLIMATE_PRESSURE_CURRENT = "max(typhon_vpd_kpa) or on() vector(0)" +CLIMATE_HUMIDITY_MAX = "max(typhon_relative_humidity_percent) or on() vector(0)" +CLIMATE_TEMP_SERIES = "typhon_temperature_celsius" +CLIMATE_PRESSURE_SERIES = "typhon_vpd_kpa" CLIMATE_FAN_OUTLET_CURRENT = ( - 'max(atlas_climate_fan_activity_level{fan_group="outlet"}) ' - 'or max(atlas_climate_fan_activity_level{position="outlet"}) ' - "or on() vector(0)" + 'max(typhon_fan_speed_level{fan_group="outlet"}) or on() vector(0)' ) CLIMATE_FAN_INSIDE_INLET_CURRENT = ( - 'max(atlas_climate_fan_activity_level{fan_group="inside_inlet"}) ' - 'or max(atlas_climate_fan_activity_level{position="inside_inlet"}) ' - "or on() vector(0)" + 'max(typhon_fan_speed_level{fan_group="inside_inlet"}) or on() vector(0)' ) CLIMATE_FAN_OUTSIDE_INLET_CURRENT = ( - 'max(atlas_climate_fan_activity_level{fan_group="outside_inlet"}) ' - 'or max(atlas_climate_fan_activity_level{position="outside_inlet"}) ' - "or on() vector(0)" + 'max(typhon_fan_speed_level{fan_group="outside_inlet"}) or on() vector(0)' ) CLIMATE_FAN_INTERIOR_CURRENT = ( - 'max(atlas_climate_fan_activity_level{fan_group="interior"}) ' - 'or max(atlas_climate_fan_activity_level{position="interior"}) ' - "or on() vector(0)" + 'max(typhon_fan_speed_level{fan_group=~"interior|unknown"}) or on() vector(0)' ) CLIMATE_FAN_OUTLET_SERIES = ( - '(atlas_climate_fan_activity_level{fan_group="outlet"} ' - 'or atlas_climate_fan_activity_level{position="outlet"})' + 'typhon_fan_speed_level{fan_group="outlet"}' ) CLIMATE_FAN_INSIDE_INLET_SERIES = ( - '(atlas_climate_fan_activity_level{fan_group="inside_inlet"} ' - 'or atlas_climate_fan_activity_level{position="inside_inlet"})' + 'typhon_fan_speed_level{fan_group="inside_inlet"}' ) CLIMATE_FAN_OUTSIDE_INLET_SERIES = ( - '(atlas_climate_fan_activity_level{fan_group="outside_inlet"} ' - 'or atlas_climate_fan_activity_level{position="outside_inlet"})' + 'typhon_fan_speed_level{fan_group="outside_inlet"}' ) CLIMATE_FAN_INTERIOR_SERIES = ( - '(atlas_climate_fan_activity_level{fan_group="interior"} ' - 'or atlas_climate_fan_activity_level{position="interior"})' + 'typhon_fan_speed_level{fan_group=~"interior|unknown"}' ) POSTGRES_CONN_USED = ( 'label_replace(sum(pg_stat_activity_count), "conn", "used", "__name__", ".*") ' diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index d1557b7d..5939f590 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1363,13 +1363,13 @@ "targets": [ { "refId": "A", - "expr": "max(atlas_climate_tent_temperature_celsius) or max(atlas_climate_temperature_celsius) or on() vector(0)", + "expr": "max(typhon_temperature_celsius) or on() vector(0)", "legendFormat": "Tent Temp (\u00b0C)", "instant": true }, { "refId": "B", - "expr": "max(atlas_climate_tent_pressure_kpa) or max(atlas_climate_pressure_kpa) or on() vector(0)", + "expr": "max(typhon_vpd_kpa) or on() vector(0)", "legendFormat": "Tent Pressure (kPa)", "instant": true } @@ -1467,12 +1467,12 @@ "targets": [ { "refId": "A", - "expr": "(atlas_climate_tent_temperature_celsius or atlas_climate_temperature_celsius)", + "expr": "typhon_temperature_celsius", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(atlas_climate_tent_pressure_kpa or atlas_climate_pressure_kpa)", + "expr": "typhon_vpd_kpa", "legendFormat": "Pressure (kPa)" } ], @@ -1541,25 +1541,25 @@ "targets": [ { "refId": "A", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outlet\"}) or max(atlas_climate_fan_activity_level{position=\"outlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))", "legendFormat": "Inside Outlet", "instant": true }, { "refId": "B", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"inside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))", "legendFormat": "Inside Inlet", "instant": true }, { "refId": "C", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"outside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))", "legendFormat": "Outside Inlet", "instant": true }, { "refId": "D", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"interior\"}) or max(atlas_climate_fan_activity_level{position=\"interior\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=~\"interior|unknown\"}) or on() vector(0))", "legendFormat": "Interior Fans", "instant": true } @@ -1633,22 +1633,22 @@ "targets": [ { "refId": "A", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outlet\"} or atlas_climate_fan_activity_level{position=\"outlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}", "legendFormat": "Inside Outlet" }, { "refId": "B", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"} or atlas_climate_fan_activity_level{position=\"inside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}", "legendFormat": "Inside Inlet" }, { "refId": "C", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"} or atlas_climate_fan_activity_level{position=\"outside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}", "legendFormat": "Outside Inlet" }, { "refId": "D", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"interior\"} or atlas_climate_fan_activity_level{position=\"interior\"})", + "expr": "typhon_fan_speed_level{fan_group=~\"interior|unknown\"}", "legendFormat": "Interior Fans" } ], diff --git a/services/monitoring/dashboards/atlas-power.json b/services/monitoring/dashboards/atlas-power.json index 9a8cceeb..01f45a23 100644 --- a/services/monitoring/dashboards/atlas-power.json +++ b/services/monitoring/dashboards/atlas-power.json @@ -284,13 +284,13 @@ "targets": [ { "refId": "A", - "expr": "max(atlas_climate_tent_temperature_celsius) or max(atlas_climate_temperature_celsius) or on() vector(0)", + "expr": "max(typhon_temperature_celsius) or on() vector(0)", "legendFormat": "Tent Temp (\u00b0C)", "instant": true }, { "refId": "B", - "expr": "max(atlas_climate_tent_pressure_kpa) or max(atlas_climate_pressure_kpa) or on() vector(0)", + "expr": "max(typhon_vpd_kpa) or on() vector(0)", "legendFormat": "Tent Pressure (kPa)", "instant": true } @@ -379,12 +379,12 @@ "targets": [ { "refId": "A", - "expr": "(atlas_climate_tent_temperature_celsius or atlas_climate_temperature_celsius)", + "expr": "typhon_temperature_celsius", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(atlas_climate_tent_pressure_kpa or atlas_climate_pressure_kpa)", + "expr": "typhon_vpd_kpa", "legendFormat": "Pressure (kPa)" } ], @@ -447,25 +447,25 @@ "targets": [ { "refId": "A", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outlet\"}) or max(atlas_climate_fan_activity_level{position=\"outlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))", "legendFormat": "Inside Outlet", "instant": true }, { "refId": "B", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"inside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))", "legendFormat": "Inside Inlet", "instant": true }, { "refId": "C", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"outside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))", "legendFormat": "Outside Inlet", "instant": true }, { "refId": "D", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"interior\"}) or max(atlas_climate_fan_activity_level{position=\"interior\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=~\"interior|unknown\"}) or on() vector(0))", "legendFormat": "Interior Fans", "instant": true } @@ -533,22 +533,22 @@ "targets": [ { "refId": "A", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outlet\"} or atlas_climate_fan_activity_level{position=\"outlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}", "legendFormat": "Inside Outlet" }, { "refId": "B", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"} or atlas_climate_fan_activity_level{position=\"inside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}", "legendFormat": "Inside Inlet" }, { "refId": "C", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"} or atlas_climate_fan_activity_level{position=\"outside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}", "legendFormat": "Outside Inlet" }, { "refId": "D", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"interior\"} or atlas_climate_fan_activity_level{position=\"interior\"})", + "expr": "typhon_fan_speed_level{fan_group=~\"interior|unknown\"}", "legendFormat": "Interior Fans" } ], diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index 43844351..aced4b53 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1372,13 +1372,13 @@ data: "targets": [ { "refId": "A", - "expr": "max(atlas_climate_tent_temperature_celsius) or max(atlas_climate_temperature_celsius) or on() vector(0)", + "expr": "max(typhon_temperature_celsius) or on() vector(0)", "legendFormat": "Tent Temp (\u00b0C)", "instant": true }, { "refId": "B", - "expr": "max(atlas_climate_tent_pressure_kpa) or max(atlas_climate_pressure_kpa) or on() vector(0)", + "expr": "max(typhon_vpd_kpa) or on() vector(0)", "legendFormat": "Tent Pressure (kPa)", "instant": true } @@ -1476,12 +1476,12 @@ data: "targets": [ { "refId": "A", - "expr": "(atlas_climate_tent_temperature_celsius or atlas_climate_temperature_celsius)", + "expr": "typhon_temperature_celsius", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(atlas_climate_tent_pressure_kpa or atlas_climate_pressure_kpa)", + "expr": "typhon_vpd_kpa", "legendFormat": "Pressure (kPa)" } ], @@ -1550,25 +1550,25 @@ data: "targets": [ { "refId": "A", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outlet\"}) or max(atlas_climate_fan_activity_level{position=\"outlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))", "legendFormat": "Inside Outlet", "instant": true }, { "refId": "B", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"inside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))", "legendFormat": "Inside Inlet", "instant": true }, { "refId": "C", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"outside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))", "legendFormat": "Outside Inlet", "instant": true }, { "refId": "D", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"interior\"}) or max(atlas_climate_fan_activity_level{position=\"interior\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=~\"interior|unknown\"}) or on() vector(0))", "legendFormat": "Interior Fans", "instant": true } @@ -1642,22 +1642,22 @@ data: "targets": [ { "refId": "A", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outlet\"} or atlas_climate_fan_activity_level{position=\"outlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}", "legendFormat": "Inside Outlet" }, { "refId": "B", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"} or atlas_climate_fan_activity_level{position=\"inside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}", "legendFormat": "Inside Inlet" }, { "refId": "C", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"} or atlas_climate_fan_activity_level{position=\"outside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}", "legendFormat": "Outside Inlet" }, { "refId": "D", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"interior\"} or atlas_climate_fan_activity_level{position=\"interior\"})", + "expr": "typhon_fan_speed_level{fan_group=~\"interior|unknown\"}", "legendFormat": "Interior Fans" } ], diff --git a/services/monitoring/grafana-dashboard-power.yaml b/services/monitoring/grafana-dashboard-power.yaml index 3882c4bc..45bbe8f4 100644 --- a/services/monitoring/grafana-dashboard-power.yaml +++ b/services/monitoring/grafana-dashboard-power.yaml @@ -293,13 +293,13 @@ data: "targets": [ { "refId": "A", - "expr": "max(atlas_climate_tent_temperature_celsius) or max(atlas_climate_temperature_celsius) or on() vector(0)", + "expr": "max(typhon_temperature_celsius) or on() vector(0)", "legendFormat": "Tent Temp (\u00b0C)", "instant": true }, { "refId": "B", - "expr": "max(atlas_climate_tent_pressure_kpa) or max(atlas_climate_pressure_kpa) or on() vector(0)", + "expr": "max(typhon_vpd_kpa) or on() vector(0)", "legendFormat": "Tent Pressure (kPa)", "instant": true } @@ -388,12 +388,12 @@ data: "targets": [ { "refId": "A", - "expr": "(atlas_climate_tent_temperature_celsius or atlas_climate_temperature_celsius)", + "expr": "typhon_temperature_celsius", "legendFormat": "Temperature (\u00b0C)" }, { "refId": "B", - "expr": "(atlas_climate_tent_pressure_kpa or atlas_climate_pressure_kpa)", + "expr": "typhon_vpd_kpa", "legendFormat": "Pressure (kPa)" } ], @@ -456,25 +456,25 @@ data: "targets": [ { "refId": "A", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outlet\"}) or max(atlas_climate_fan_activity_level{position=\"outlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outlet\"}) or on() vector(0))", "legendFormat": "Inside Outlet", "instant": true }, { "refId": "B", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"inside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"inside_inlet\"}) or on() vector(0))", "legendFormat": "Inside Inlet", "instant": true }, { "refId": "C", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"}) or max(atlas_climate_fan_activity_level{position=\"outside_inlet\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=\"outside_inlet\"}) or on() vector(0))", "legendFormat": "Outside Inlet", "instant": true }, { "refId": "D", - "expr": "round(max(atlas_climate_fan_activity_level{fan_group=\"interior\"}) or max(atlas_climate_fan_activity_level{position=\"interior\"}) or on() vector(0))", + "expr": "round(max(typhon_fan_speed_level{fan_group=~\"interior|unknown\"}) or on() vector(0))", "legendFormat": "Interior Fans", "instant": true } @@ -542,22 +542,22 @@ data: "targets": [ { "refId": "A", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outlet\"} or atlas_climate_fan_activity_level{position=\"outlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outlet\"}", "legendFormat": "Inside Outlet" }, { "refId": "B", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"inside_inlet\"} or atlas_climate_fan_activity_level{position=\"inside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"inside_inlet\"}", "legendFormat": "Inside Inlet" }, { "refId": "C", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"outside_inlet\"} or atlas_climate_fan_activity_level{position=\"outside_inlet\"})", + "expr": "typhon_fan_speed_level{fan_group=\"outside_inlet\"}", "legendFormat": "Outside Inlet" }, { "refId": "D", - "expr": "(atlas_climate_fan_activity_level{fan_group=\"interior\"} or atlas_climate_fan_activity_level{position=\"interior\"})", + "expr": "typhon_fan_speed_level{fan_group=~\"interior|unknown\"}", "legendFormat": "Interior Fans" } ],