monitoring(overview): swap jobs and power rows; tighten climate/fan display

This commit is contained in:
Brad Stein 2026-04-04 04:34:18 -03:00
parent 3c21b470ed
commit 12ce0f8e2a
3 changed files with 42 additions and 36 deletions

View File

@ -646,6 +646,7 @@ def stat_panel(
targets=None,
field_overrides=None,
description=None,
orientation=None,
):
"""Return a Grafana stat panel definition."""
defaults = {
@ -684,6 +685,8 @@ def stat_panel(
"textMode": text_mode,
},
}
if orientation:
panel["options"]["orientation"] = orientation
if legend and len(panel["targets"]) == 1:
panel["targets"][0]["legendFormat"] = legend
if instant:
@ -1278,7 +1281,7 @@ def build_overview():
40,
"UPS Current Load",
None,
{"h": 6, "w": 4, "x": 0, "y": 11},
{"h": 6, "w": 4, "x": 0, "y": 14},
unit="none",
decimals=1,
text_mode="name_and_value",
@ -1307,7 +1310,7 @@ def build_overview():
41,
"UPS History (Power Draw)",
None,
{"h": 6, "w": 4, "x": 4, "y": 11},
{"h": 6, "w": 4, "x": 4, "y": 14},
unit="watt",
targets=[
{"refId": "A", "expr": HECATE_UPS_DRAW_WATTS_DB_SERIES, "legendFormat": "titan-db"},
@ -1324,10 +1327,10 @@ def build_overview():
42,
"Current Climate",
None,
{"h": 6, "w": 4, "x": 8, "y": 11},
{"h": 6, "w": 4, "x": 8, "y": 14},
unit="none",
decimals=2,
text_mode="name_and_value",
text_mode="value",
targets=[
{"refId": "A", "expr": CLIMATE_TEMP_MAX, "legendFormat": "Tent Temp (°C)", "instant": True},
{"refId": "B", "expr": CLIMATE_PRESSURE_CURRENT, "legendFormat": "Tent Pressure (kPa)", "instant": True},
@ -1338,6 +1341,7 @@ def build_overview():
],
links=link_to("atlas-power"),
description="Current tent temperature and pressure.",
orientation="vertical",
)
)
panels.append(
@ -1345,7 +1349,7 @@ def build_overview():
43,
"Climate History",
None,
{"h": 6, "w": 4, "x": 12, "y": 11},
{"h": 6, "w": 4, "x": 12, "y": 14},
unit="celsius",
targets=[
{"refId": "A", "expr": CLIMATE_TEMP_SERIES, "legendFormat": "Temperature (°C)"},
@ -1372,9 +1376,9 @@ def build_overview():
140,
"Fan Activity",
None,
{"h": 6, "w": 4, "x": 16, "y": 11},
{"h": 6, "w": 4, "x": 16, "y": 14},
unit="none",
decimals=1,
decimals=0,
text_mode="name_and_value",
targets=[
{"refId": "A", "expr": CLIMATE_FAN_OUTLET_CURRENT, "legendFormat": "Outlet", "instant": True},
@ -1398,7 +1402,7 @@ def build_overview():
141,
"Fan History (0-10)",
None,
{"h": 6, "w": 4, "x": 20, "y": 11},
{"h": 6, "w": 4, "x": 20, "y": 14},
unit="none",
max_value=10,
targets=[
@ -1418,7 +1422,7 @@ def build_overview():
44,
"One-off Job Pods >1h",
f"({ONEOFF_JOB_POD_AGE_HOURS}) > 1",
{"h": 3, "w": 6, "x": 0, "y": 17},
{"h": 3, "w": 6, "x": 0, "y": 11},
unit="h",
instant=True,
transformations=[
@ -1434,7 +1438,7 @@ def build_overview():
45,
"Ariadne Attempts (24h)",
"sum(increase(ariadne_task_runs_total[24h]))",
{"h": 3, "w": 6, "x": 6, "y": 17},
{"h": 3, "w": 6, "x": 6, "y": 11},
unit="none",
decimals=0,
links=link_to("atlas-jobs"),
@ -1444,7 +1448,7 @@ def build_overview():
46,
"Platform Test Success Rate",
TEST_SUCCESS_RATE,
{"h": 3, "w": 6, "x": 12, "y": 17},
{"h": 3, "w": 6, "x": 12, "y": 11},
unit="percent",
decimals=2,
thresholds={
@ -1467,7 +1471,7 @@ def build_overview():
47,
"Platform Test Failures (24h)",
TEST_FAILURES_24H_TOTAL,
{"h": 3, "w": 6, "x": 18, "y": 17},
{"h": 3, "w": 6, "x": 18, "y": 11},
unit="none",
decimals=0,
instant=True,

View File

@ -1082,7 +1082,7 @@
"h": 6,
"w": 4,
"x": 0,
"y": 11
"y": 14
},
"targets": [
{
@ -1280,7 +1280,7 @@
"h": 6,
"w": 4,
"x": 4,
"y": 11
"y": 14
},
"targets": [
{
@ -1334,7 +1334,7 @@
"h": 6,
"w": 4,
"x": 8,
"y": 11
"y": 14
},
"targets": [
{
@ -1413,7 +1413,8 @@
"fields": "",
"values": false
},
"textMode": "name_and_value"
"textMode": "value",
"orientation": "vertical"
},
"links": [
{
@ -1436,7 +1437,7 @@
"h": 6,
"w": 4,
"x": 12,
"y": 11
"y": 14
},
"targets": [
{
@ -1510,7 +1511,7 @@
"h": 6,
"w": 4,
"x": 16,
"y": 11
"y": 14
},
"targets": [
{
@ -1565,7 +1566,7 @@
"custom": {
"displayMode": "auto"
},
"decimals": 1
"decimals": 0
},
"overrides": []
},
@ -1602,7 +1603,7 @@
"h": 6,
"w": 4,
"x": 20,
"y": 11
"y": 14
},
"targets": [
{
@ -1662,7 +1663,7 @@
"h": 3,
"w": 6,
"x": 0,
"y": 17
"y": 11
},
"targets": [
{
@ -1721,7 +1722,7 @@
"h": 3,
"w": 6,
"x": 6,
"y": 17
"y": 11
},
"targets": [
{
@ -1789,7 +1790,7 @@
"h": 3,
"w": 6,
"x": 12,
"y": 17
"y": 11
},
"targets": [
{
@ -1866,7 +1867,7 @@
"h": 3,
"w": 6,
"x": 18,
"y": 17
"y": 11
},
"targets": [
{

View File

@ -1091,7 +1091,7 @@ data:
"h": 6,
"w": 4,
"x": 0,
"y": 11
"y": 14
},
"targets": [
{
@ -1289,7 +1289,7 @@ data:
"h": 6,
"w": 4,
"x": 4,
"y": 11
"y": 14
},
"targets": [
{
@ -1343,7 +1343,7 @@ data:
"h": 6,
"w": 4,
"x": 8,
"y": 11
"y": 14
},
"targets": [
{
@ -1422,7 +1422,8 @@ data:
"fields": "",
"values": false
},
"textMode": "name_and_value"
"textMode": "value",
"orientation": "vertical"
},
"links": [
{
@ -1445,7 +1446,7 @@ data:
"h": 6,
"w": 4,
"x": 12,
"y": 11
"y": 14
},
"targets": [
{
@ -1519,7 +1520,7 @@ data:
"h": 6,
"w": 4,
"x": 16,
"y": 11
"y": 14
},
"targets": [
{
@ -1574,7 +1575,7 @@ data:
"custom": {
"displayMode": "auto"
},
"decimals": 1
"decimals": 0
},
"overrides": []
},
@ -1611,7 +1612,7 @@ data:
"h": 6,
"w": 4,
"x": 20,
"y": 11
"y": 14
},
"targets": [
{
@ -1671,7 +1672,7 @@ data:
"h": 3,
"w": 6,
"x": 0,
"y": 17
"y": 11
},
"targets": [
{
@ -1730,7 +1731,7 @@ data:
"h": 3,
"w": 6,
"x": 6,
"y": 17
"y": 11
},
"targets": [
{
@ -1798,7 +1799,7 @@ data:
"h": 3,
"w": 6,
"x": 12,
"y": 17
"y": 11
},
"targets": [
{
@ -1875,7 +1876,7 @@ data:
"h": 3,
"w": 6,
"x": 18,
"y": 17
"y": 11
},
"targets": [
{