monitoring: split climate and ups current panels
This commit is contained in:
parent
e5ffa94c1d
commit
f26d7afbbc
@ -1740,43 +1740,49 @@ def build_overview():
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
panels.append(
|
panels.append(
|
||||||
canvas_metric_grid_panel(
|
stat_panel(
|
||||||
40,
|
40,
|
||||||
"UPS Current Load",
|
f"{ANANKE_UPS_DB_NAME} UPS Current",
|
||||||
{"h": 5, "w": 6, "x": 0, "y": 7},
|
None,
|
||||||
|
{"h": 2, "w": 6, "x": 0, "y": 7},
|
||||||
|
unit="none",
|
||||||
|
decimals=1,
|
||||||
|
text_mode="name_and_value",
|
||||||
|
orientation="horizontal",
|
||||||
|
wide_layout=True,
|
||||||
|
graph_mode="none",
|
||||||
targets=[
|
targets=[
|
||||||
{"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_DB, "legendFormat": f"{ANANKE_UPS_DB_NAME} Draw", "instant": True},
|
{"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_DB, "legendFormat": "Draw", "instant": True},
|
||||||
{"refId": "B", "expr": ANANKE_UPS_RUNTIME_DB, "legendFormat": f"{ANANKE_UPS_DB_NAME} Runtime", "instant": True},
|
{"refId": "B", "expr": ANANKE_UPS_RUNTIME_DB, "legendFormat": "Runtime", "instant": True},
|
||||||
{"refId": "C", "expr": ANANKE_UPS_DRAW_WATTS_TETHYS, "legendFormat": f"{ANANKE_UPS_TETHYS_NAME} Draw", "instant": True},
|
|
||||||
{"refId": "D", "expr": ANANKE_UPS_RUNTIME_TETHYS, "legendFormat": f"{ANANKE_UPS_TETHYS_NAME} Runtime", "instant": True},
|
|
||||||
{"refId": "E", "expr": ANANKE_UPS_DISCHARGE_RISK_DB, "legendFormat": f"{ANANKE_UPS_DB_NAME} Risk", "instant": True},
|
|
||||||
{"refId": "F", "expr": ANANKE_UPS_DISCHARGE_RISK_TETHYS, "legendFormat": f"{ANANKE_UPS_TETHYS_NAME} Risk", "instant": True},
|
|
||||||
],
|
],
|
||||||
field_overrides=[
|
field_overrides=[
|
||||||
{"matcher": {"id": "byRegexp", "options": ".*Draw$"}, "properties": [{"id": "unit", "value": "watt"}]},
|
{"matcher": {"id": "byName", "options": "Draw"}, "properties": [{"id": "unit", "value": "watt"}]},
|
||||||
{"matcher": {"id": "byRegexp", "options": ".*Runtime$"}, "properties": [{"id": "unit", "value": "s"}]},
|
{"matcher": {"id": "byName", "options": "Runtime"}, "properties": [{"id": "unit", "value": "s"}]},
|
||||||
|
],
|
||||||
|
links=link_to("atlas-power"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
panels.append(
|
||||||
|
stat_panel(
|
||||||
|
144,
|
||||||
|
f"{ANANKE_UPS_TETHYS_NAME} UPS Current",
|
||||||
|
None,
|
||||||
|
{"h": 2, "w": 6, "x": 0, "y": 9},
|
||||||
|
unit="none",
|
||||||
|
decimals=1,
|
||||||
|
text_mode="name_and_value",
|
||||||
|
orientation="horizontal",
|
||||||
|
wide_layout=True,
|
||||||
|
graph_mode="none",
|
||||||
|
targets=[
|
||||||
|
{"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_TETHYS, "legendFormat": "Draw", "instant": True},
|
||||||
|
{"refId": "B", "expr": ANANKE_UPS_RUNTIME_TETHYS, "legendFormat": "Runtime", "instant": True},
|
||||||
|
],
|
||||||
|
field_overrides=[
|
||||||
|
{"matcher": {"id": "byName", "options": "Draw"}, "properties": [{"id": "unit", "value": "watt"}]},
|
||||||
|
{"matcher": {"id": "byName", "options": "Runtime"}, "properties": [{"id": "unit", "value": "s"}]},
|
||||||
],
|
],
|
||||||
color_fields=[
|
|
||||||
f"{ANANKE_UPS_DB_NAME} Risk",
|
|
||||||
f"{ANANKE_UPS_DB_NAME} Risk",
|
|
||||||
f"{ANANKE_UPS_TETHYS_NAME} Risk",
|
|
||||||
f"{ANANKE_UPS_TETHYS_NAME} Risk",
|
|
||||||
],
|
|
||||||
thresholds={
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{"color": "green", "value": None},
|
|
||||||
{"color": "yellow", "value": 1},
|
|
||||||
{"color": "orange", "value": 2},
|
|
||||||
{"color": "red", "value": 3},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
links=link_to("atlas-power"),
|
links=link_to("atlas-power"),
|
||||||
description=(
|
|
||||||
"Per-UPS live snapshot in a centered 2x2 layout. "
|
|
||||||
"Color turns yellow when discharging, orange below 3x graceful shutdown runtime, red below 2x."
|
|
||||||
),
|
|
||||||
metric_size=26,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels.append(
|
panels.append(
|
||||||
@ -1797,29 +1803,50 @@ def build_overview():
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels.append(
|
panels.append(
|
||||||
canvas_metric_grid_panel(
|
stat_panel(
|
||||||
42,
|
42,
|
||||||
"Current Enclosure Climate",
|
"Current Enclosure Temperature",
|
||||||
{"h": 6, "w": 6, "x": 0, "y": 12},
|
None,
|
||||||
|
{"h": 3, "w": 6, "x": 0, "y": 12},
|
||||||
|
unit="none",
|
||||||
|
text_mode="value",
|
||||||
|
orientation="horizontal",
|
||||||
|
wide_layout=True,
|
||||||
|
graph_mode="none",
|
||||||
targets=[
|
targets=[
|
||||||
{"refId": "A", "expr": CLIMATE_TEMP_MAX, "legendFormat": "Temp °C", "instant": True},
|
{"refId": "A", "expr": CLIMATE_TEMP_MAX, "legendFormat": "C", "instant": True},
|
||||||
{"refId": "B", "expr": CLIMATE_TEMP_FAHRENHEIT_MAX, "legendFormat": "Temp °F", "instant": True},
|
{"refId": "B", "expr": CLIMATE_TEMP_FAHRENHEIT_MAX, "legendFormat": "F", "instant": True},
|
||||||
{"refId": "C", "expr": CLIMATE_HUMIDITY_MAX, "legendFormat": "Humidity", "instant": True},
|
|
||||||
{"refId": "D", "expr": CLIMATE_PRESSURE_CURRENT, "legendFormat": "Pressure", "instant": True},
|
|
||||||
],
|
],
|
||||||
field_overrides=[
|
field_overrides=[
|
||||||
{"matcher": {"id": "byName", "options": "Temp °C"}, "properties": [{"id": "unit", "value": "celsius"}]},
|
{"matcher": {"id": "byName", "options": "C"}, "properties": [{"id": "unit", "value": "celsius"}]},
|
||||||
{"matcher": {"id": "byName", "options": "Temp °F"}, "properties": [{"id": "unit", "value": "fahrenheit"}]},
|
{"matcher": {"id": "byName", "options": "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"}]},
|
|
||||||
],
|
],
|
||||||
links=link_to("atlas-power"),
|
links=link_to("atlas-power"),
|
||||||
description="Current tent values in a fixed 2x2 layout: Temp °C / Temp °F / Humidity / Pressure.",
|
|
||||||
metric_size=30,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels.append(
|
panels.append(
|
||||||
timeseries_panel(
|
stat_panel(
|
||||||
|
143,
|
||||||
|
"Current Enclosure Climate",
|
||||||
|
None,
|
||||||
|
{"h": 3, "w": 6, "x": 0, "y": 15},
|
||||||
|
unit="none",
|
||||||
|
text_mode="value",
|
||||||
|
orientation="horizontal",
|
||||||
|
wide_layout=True,
|
||||||
|
graph_mode="none",
|
||||||
|
targets=[
|
||||||
|
{"refId": "A", "expr": CLIMATE_HUMIDITY_MAX, "legendFormat": "RH", "instant": True},
|
||||||
|
{"refId": "B", "expr": CLIMATE_PRESSURE_CURRENT, "legendFormat": "P", "instant": True},
|
||||||
|
],
|
||||||
|
field_overrides=[
|
||||||
|
{"matcher": {"id": "byName", "options": "RH"}, "properties": [{"id": "unit", "value": "suffix:%RH"}]},
|
||||||
|
{"matcher": {"id": "byName", "options": "P"}, "properties": [{"id": "unit", "value": "suffix:kPa"}]},
|
||||||
|
],
|
||||||
|
links=link_to("atlas-power"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
climate_history_panel = timeseries_panel(
|
||||||
43,
|
43,
|
||||||
"Enclosure Climate History",
|
"Enclosure Climate History",
|
||||||
None,
|
None,
|
||||||
@ -1909,7 +1936,15 @@ def build_overview():
|
|||||||
links=link_to("atlas-power"),
|
links=link_to("atlas-power"),
|
||||||
description="Temperature on left axis, humidity and pressure on right axis with dynamic bound series so small swings remain visible.",
|
description="Temperature on left axis, humidity and pressure on right axis with dynamic bound series so small swings remain visible.",
|
||||||
)
|
)
|
||||||
)
|
climate_history_panel["fieldConfig"]["defaults"]["custom"] = {
|
||||||
|
"drawStyle": "line",
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 2,
|
||||||
|
"fillOpacity": 10,
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": True,
|
||||||
|
}
|
||||||
|
panels.append(climate_history_panel)
|
||||||
panels.append(
|
panels.append(
|
||||||
stat_panel(
|
stat_panel(
|
||||||
140,
|
140,
|
||||||
|
|||||||
@ -333,6 +333,32 @@ data:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pipelineJob('typhon') {
|
||||||
|
properties {
|
||||||
|
pipelineTriggers {
|
||||||
|
triggers {
|
||||||
|
scmTrigger {
|
||||||
|
scmpoll_spec('H/5 * * * *')
|
||||||
|
ignorePostCommitHooks(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
definition {
|
||||||
|
cpsScm {
|
||||||
|
scm {
|
||||||
|
git {
|
||||||
|
remote {
|
||||||
|
url('https://scm.bstein.dev/bstein/typhon.git')
|
||||||
|
credentials('gitea-pat')
|
||||||
|
}
|
||||||
|
branches('*/main')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scriptPath('Jenkinsfile')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
multibranchPipelineJob('titan-iac-quality-gate') {
|
multibranchPipelineJob('titan-iac-quality-gate') {
|
||||||
branchSources {
|
branchSources {
|
||||||
branchSource {
|
branchSource {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user