monitoring(overview): restore single-panel cards and dynamic climate axes

This commit is contained in:
Brad Stein 2026-04-12 22:53:23 -03:00
parent d642deb4f4
commit f17fa41207
5 changed files with 216 additions and 563 deletions

View File

@ -679,18 +679,6 @@ CLIMATE_CURRENT_ROW_EXPR = " or ".join(
with_metric_label(CLIMATE_PRESSURE_CURRENT, "Pressure"),
]
)
CLIMATE_CURRENT_ROW_TOP_EXPR = " or ".join(
[
with_metric_label(CLIMATE_TEMP_MAX, "Temp °C"),
with_metric_label(CLIMATE_TEMP_FAHRENHEIT_MAX, "Temp °F"),
]
)
CLIMATE_CURRENT_ROW_BOTTOM_EXPR = " or ".join(
[
with_metric_label(CLIMATE_HUMIDITY_MAX, "Humidity"),
with_metric_label(CLIMATE_PRESSURE_CURRENT, "Pressure"),
]
)
CLIMATE_FAN_CURRENT_ROW_EXPR = " or ".join(
[
with_metric_label(f"round({CLIMATE_FAN_OUTLET_CURRENT})", "Outlet"),
@ -701,22 +689,10 @@ CLIMATE_FAN_CURRENT_ROW_EXPR = " or ".join(
)
UPS_CURRENT_ROW_EXPR = " or ".join(
[
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_DB, "Py", "Draw"),
with_ups_metric_labels(ANANKE_UPS_RUNTIME_DB, "Py", "Runtime"),
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_TETHYS, "St", "Draw"),
with_ups_metric_labels(ANANKE_UPS_RUNTIME_TETHYS, "St", "Runtime"),
]
)
UPS_CURRENT_ROW_TOP_EXPR = " or ".join(
[
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_DB, "Py", "Draw"),
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_TETHYS, "St", "Draw"),
]
)
UPS_CURRENT_ROW_BOTTOM_EXPR = " or ".join(
[
with_ups_metric_labels(ANANKE_UPS_RUNTIME_DB, "Py", "Runtime"),
with_ups_metric_labels(ANANKE_UPS_RUNTIME_TETHYS, "St", "Runtime"),
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_DB, ANANKE_UPS_DB_NAME, "Draw"),
with_ups_metric_labels(ANANKE_UPS_RUNTIME_DB, ANANKE_UPS_DB_NAME, "Runtime"),
with_ups_metric_labels(ANANKE_UPS_DRAW_WATTS_TETHYS, ANANKE_UPS_TETHYS_NAME, "Draw"),
with_ups_metric_labels(ANANKE_UPS_RUNTIME_TETHYS, ANANKE_UPS_TETHYS_NAME, "Runtime"),
]
)
POSTGRES_CONN_USED = (
@ -1483,8 +1459,8 @@ def build_overview():
stat_panel(
40,
"UPS Current Load",
UPS_CURRENT_ROW_TOP_EXPR,
{"h": 3, "w": 6, "x": 0, "y": 7},
UPS_CURRENT_ROW_EXPR,
{"h": 5, "w": 6, "x": 0, "y": 7},
unit="none",
decimals=1,
text_mode="name_and_value",
@ -1502,28 +1478,6 @@ def build_overview():
value_size=24,
)
)
panels.append(
stat_panel(
144,
"",
UPS_CURRENT_ROW_BOTTOM_EXPR,
{"h": 2, "w": 6, "x": 0, "y": 10},
unit="none",
decimals=1,
text_mode="name_and_value",
legend="{{ups}} {{metric}}",
instant=True,
field_overrides=[
{"matcher": {"id": "byRegexp", "options": ".*Draw$"}, "properties": [{"id": "unit", "value": "watt"}]},
{"matcher": {"id": "byRegexp", "options": ".*Runtime$"}, "properties": [{"id": "unit", "value": "s"}]},
],
orientation="vertical",
wide_layout=False,
title_size=14,
value_size=24,
graph_mode="none",
)
)
panels.append(
timeseries_panel(
41,
@ -1545,8 +1499,8 @@ def build_overview():
stat_panel(
42,
"Current Climate",
CLIMATE_CURRENT_ROW_TOP_EXPR,
{"h": 3, "w": 6, "x": 0, "y": 12},
CLIMATE_CURRENT_ROW_EXPR,
{"h": 6, "w": 6, "x": 0, "y": 12},
unit="none",
decimals=2,
text_mode="name_and_value",
@ -1566,48 +1520,35 @@ def build_overview():
value_size=28,
)
)
panels.append(
stat_panel(
143,
"",
CLIMATE_CURRENT_ROW_BOTTOM_EXPR,
{"h": 3, "w": 6, "x": 0, "y": 15},
unit="none",
decimals=2,
text_mode="name_and_value",
legend="{{metric}}",
instant=True,
field_overrides=[
{"matcher": {"id": "byName", "options": "Temp °C"}, "properties": [{"id": "unit", "value": "celsius"}]},
{"matcher": {"id": "byName", "options": "Temp °F"}, "properties": [{"id": "unit", "value": "fahrenheit"}]},
{"matcher": {"id": "byName", "options": "Humidity"}, "properties": [{"id": "unit", "value": "percent"}]},
{"matcher": {"id": "byName", "options": "Pressure"}, "properties": [{"id": "unit", "value": "suffix:kPa"}]},
],
orientation="vertical",
wide_layout=False,
title_size=16,
value_size=28,
graph_mode="none",
)
)
panels.append(
timeseries_panel(
43,
"Climate History",
None,
{"h": 6, "w": 6, "x": 6, "y": 12},
unit="celsius",
unit="none",
targets=[
{"refId": "A", "expr": CLIMATE_TEMP_SERIES, "legendFormat": "C"},
{"refId": "B", "expr": CLIMATE_HUMIDITY_SERIES, "legendFormat": "RH"},
{"refId": "C", "expr": CLIMATE_PRESSURE_SERIES, "legendFormat": "P"},
],
field_overrides=[
{
"matcher": {"id": "byName", "options": "C"},
"properties": [
{"id": "unit", "value": "suffix:°C"},
{"id": "decimals", "value": 2},
{"id": "custom.axisPlacement", "value": "left"},
{"id": "custom.axisCenteredZero", "value": False},
],
},
{
"matcher": {"id": "byName", "options": "RH"},
"properties": [
{"id": "unit", "value": "percent"},
{"id": "unit", "value": "suffix:%"},
{"id": "decimals", "value": 2},
{"id": "custom.axisPlacement", "value": "right"},
{"id": "custom.axisCenteredZero", "value": False},
],
},
{
@ -1616,6 +1557,7 @@ def build_overview():
{"id": "unit", "value": "suffix:kPa"},
{"id": "custom.axisPlacement", "value": "right"},
{"id": "decimals", "value": 2},
{"id": "custom.axisCenteredZero", "value": False},
],
}
],
@ -3594,15 +3536,12 @@ def build_power_dashboard():
stat_panel(
1,
"UPS Current Load",
UPS_CURRENT_ROW_TOP_EXPR,
UPS_CURRENT_ROW_EXPR,
{"h": 8, "w": 12, "x": 0, "y": 0},
unit="none",
decimals=1,
text_mode="name_and_value",
targets=[
{"expr": UPS_CURRENT_ROW_TOP_EXPR, "refId": "A", "legendFormat": "{{ups}} {{metric}}", "instant": True},
{"expr": UPS_CURRENT_ROW_BOTTOM_EXPR, "refId": "B", "legendFormat": "{{ups}} {{metric}}", "instant": True},
],
legend="{{ups}} {{metric}}",
instant=True,
field_overrides=[
{"matcher": {"id": "byRegexp", "options": ".*Draw$"}, "properties": [{"id": "unit", "value": "watt"}]},
@ -3638,15 +3577,12 @@ def build_power_dashboard():
stat_panel(
3,
"Current Climate",
CLIMATE_CURRENT_ROW_TOP_EXPR,
CLIMATE_CURRENT_ROW_EXPR,
{"h": 8, "w": 12, "x": 0, "y": 8},
unit="none",
decimals=2,
text_mode="name_and_value",
targets=[
{"expr": CLIMATE_CURRENT_ROW_TOP_EXPR, "refId": "A", "legendFormat": "{{metric}}", "instant": True},
{"expr": CLIMATE_CURRENT_ROW_BOTTOM_EXPR, "refId": "B", "legendFormat": "{{metric}}", "instant": True},
],
legend="{{metric}}",
instant=True,
field_overrides=[
{"matcher": {"id": "byName", "options": "Temp °C"}, "properties": [{"id": "unit", "value": "celsius"}]},
@ -3667,7 +3603,7 @@ def build_power_dashboard():
"Climate History",
None,
{"h": 8, "w": 12, "x": 12, "y": 8},
unit="celsius",
unit="none",
targets=[
{"refId": "A", "expr": CLIMATE_TEMP_SERIES, "legendFormat": "Temperature (°C)"},
{"refId": "B", "expr": CLIMATE_TEMP_FAHRENHEIT_SERIES, "legendFormat": "Temperature (°F)"},
@ -3675,17 +3611,29 @@ def build_power_dashboard():
{"refId": "D", "expr": CLIMATE_PRESSURE_SERIES, "legendFormat": "Pressure (VPD kPa)"},
],
field_overrides=[
{
"matcher": {"id": "byName", "options": "Temperature (°C)"},
"properties": [
{"id": "unit", "value": "suffix:°C"},
{"id": "decimals", "value": 2},
{"id": "custom.axisCenteredZero", "value": False},
],
},
{
"matcher": {"id": "byName", "options": "Temperature (°F)"},
"properties": [
{"id": "unit", "value": "fahrenheit"},
{"id": "unit", "value": "suffix:°F"},
{"id": "decimals", "value": 2},
{"id": "custom.axisCenteredZero", "value": False},
],
},
{
"matcher": {"id": "byName", "options": "Humidity (%)"},
"properties": [
{"id": "unit", "value": "percent"},
{"id": "unit", "value": "suffix:%"},
{"id": "decimals", "value": 2},
{"id": "custom.axisPlacement", "value": "right"},
{"id": "custom.axisCenteredZero", "value": False},
],
},
{
@ -3694,6 +3642,7 @@ def build_power_dashboard():
{"id": "unit", "value": "suffix:kPa"},
{"id": "custom.axisPlacement", "value": "right"},
{"id": "decimals", "value": 2},
{"id": "custom.axisCenteredZero", "value": False},
],
}
],

View File

@ -1079,14 +1079,14 @@
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"h": 5,
"w": 6,
"x": 0,
"y": 7
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\")",
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
@ -1172,100 +1172,6 @@
],
"description": "Per-UPS live snapshot: draw, discharge runtime, and status."
},
{
"id": 144,
"type": "stat",
"title": "",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 2,
"w": 6,
"x": 0,
"y": 10
},
"targets": [
{
"expr": "label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(115, 115, 115, 1)",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "none",
"custom": {
"displayMode": "auto"
},
"decimals": 1
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*Draw$"
},
"properties": [
{
"id": "unit",
"value": "watt"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*Runtime$"
},
"properties": [
{
"id": "unit",
"value": "s"
}
]
}
]
},
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 14,
"valueSize": 24
}
}
},
{
"id": 41,
"type": "timeseries",
@ -1329,14 +1235,14 @@
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"h": 6,
"w": 6,
"x": 0,
"y": 12
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\")",
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 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)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
@ -1446,124 +1352,6 @@
],
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
},
{
"id": 143,
"type": "stat",
"title": "",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"w": 6,
"x": 0,
"y": 15
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(115, 115, 115, 1)",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "none",
"custom": {
"displayMode": "auto"
},
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0C"
},
"properties": [
{
"id": "unit",
"value": "celsius"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0F"
},
"properties": [
{
"id": "unit",
"value": "fahrenheit"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Humidity"
},
"properties": [
{
"id": "unit",
"value": "percent"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pressure"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
}
]
}
]
},
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 16,
"valueSize": 28
}
}
},
{
"id": 43,
"type": "timeseries",
@ -1597,9 +1385,33 @@
],
"fieldConfig": {
"defaults": {
"unit": "celsius"
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "C"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "left"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -1608,11 +1420,19 @@
"properties": [
{
"id": "unit",
"value": "percent"
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -1633,6 +1453,10 @@
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
}

View File

@ -20,16 +20,10 @@
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\")",
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
},
{
"expr": "label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "B",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
}
],
"fieldConfig": {
@ -169,16 +163,10 @@
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\")",
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 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)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
},
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "B",
"legendFormat": "{{metric}}",
"instant": true
}
],
"fieldConfig": {
@ -316,9 +304,29 @@
],
"fieldConfig": {
"defaults": {
"unit": "celsius"
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -327,7 +335,15 @@
"properties": [
{
"id": "unit",
"value": "fahrenheit"
"value": "suffix:\u00b0F"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -339,11 +355,19 @@
"properties": [
{
"id": "unit",
"value": "percent"
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -364,6 +388,10 @@
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
}

View File

@ -1088,14 +1088,14 @@ data:
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"h": 5,
"w": 6,
"x": 0,
"y": 7
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\")",
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
@ -1181,100 +1181,6 @@ data:
],
"description": "Per-UPS live snapshot: draw, discharge runtime, and status."
},
{
"id": 144,
"type": "stat",
"title": "",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 2,
"w": 6,
"x": 0,
"y": 10
},
"targets": [
{
"expr": "label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(115, 115, 115, 1)",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "none",
"custom": {
"displayMode": "auto"
},
"decimals": 1
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": ".*Draw$"
},
"properties": [
{
"id": "unit",
"value": "watt"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*Runtime$"
},
"properties": [
{
"id": "unit",
"value": "s"
}
]
}
]
},
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 14,
"valueSize": 24
}
}
},
{
"id": 41,
"type": "timeseries",
@ -1338,14 +1244,14 @@ data:
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"h": 6,
"w": 6,
"x": 0,
"y": 12
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\")",
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 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)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
@ -1455,124 +1361,6 @@ data:
],
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
},
{
"id": 143,
"type": "stat",
"title": "",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 3,
"w": 6,
"x": 0,
"y": 15
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "rgba(115, 115, 115, 1)",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "none",
"custom": {
"displayMode": "auto"
},
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0C"
},
"properties": [
{
"id": "unit",
"value": "celsius"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Temp \u00b0F"
},
"properties": [
{
"id": "unit",
"value": "fahrenheit"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Humidity"
},
"properties": [
{
"id": "unit",
"value": "percent"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Pressure"
},
"properties": [
{
"id": "unit",
"value": "suffix:kPa"
}
]
}
]
},
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "name_and_value",
"orientation": "vertical",
"wideLayout": false,
"text": {
"titleSize": 16,
"valueSize": 28
}
}
},
{
"id": 43,
"type": "timeseries",
@ -1606,9 +1394,33 @@ data:
],
"fieldConfig": {
"defaults": {
"unit": "celsius"
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "C"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "left"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -1617,11 +1429,19 @@ data:
"properties": [
{
"id": "unit",
"value": "percent"
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -1642,6 +1462,10 @@ data:
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
}

View File

@ -29,16 +29,10 @@ data:
},
"targets": [
{
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\")",
"expr": "label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Pyrphoros\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Pyrphoros\"}) / 100) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Pyrphoros\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max((ananke_ups_load_percent{job=\"ananke-power\",source=\"Statera\"} * ananke_ups_power_nominal_watts{job=\"ananke-power\",source=\"Statera\"}) / 100) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Draw\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"Statera\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
},
{
"expr": "label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Pyrphoros\"}) or on() vector(0)), \"ups\", \"Py\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\") or label_replace(label_replace((max(ananke_ups_runtime_seconds{job=\"ananke-power\",source=\"Statera\"}) or on() vector(0)), \"ups\", \"St\", \"__name__\", \".*\"), \"metric\", \"Runtime\", \"__name__\", \".*\")",
"refId": "B",
"legendFormat": "{{ups}} {{metric}}",
"instant": true
}
],
"fieldConfig": {
@ -178,16 +172,10 @@ data:
},
"targets": [
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 9 / 5 + 32) or on() vector(0)), \"metric\", \"Temp \u00b0F\", \"__name__\", \".*\")",
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) or on() vector(0)), \"metric\", \"Temp \u00b0C\", \"__name__\", \".*\") or label_replace((max((max without (job,instance,pod,service,endpoint,namespace) (typhon_temperature_celsius)) * 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)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "A",
"legendFormat": "{{metric}}",
"instant": true
},
{
"expr": "label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_relative_humidity_percent)) or on() vector(0)), \"metric\", \"Humidity\", \"__name__\", \".*\") or label_replace((max(max without (job,instance,pod,service,endpoint,namespace) (typhon_vpd_kpa)) or on() vector(0)), \"metric\", \"Pressure\", \"__name__\", \".*\")",
"refId": "B",
"legendFormat": "{{metric}}",
"instant": true
}
],
"fieldConfig": {
@ -325,9 +313,29 @@ data:
],
"fieldConfig": {
"defaults": {
"unit": "celsius"
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Temperature (\u00b0C)"
},
"properties": [
{
"id": "unit",
"value": "suffix:\u00b0C"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
{
"matcher": {
"id": "byName",
@ -336,7 +344,15 @@ data:
"properties": [
{
"id": "unit",
"value": "fahrenheit"
"value": "suffix:\u00b0F"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -348,11 +364,19 @@ data:
"properties": [
{
"id": "unit",
"value": "percent"
"value": "suffix:%"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisPlacement",
"value": "right"
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
},
@ -373,6 +397,10 @@ data:
{
"id": "decimals",
"value": 2
},
{
"id": "custom.axisCenteredZero",
"value": false
}
]
}