monitoring(overview): stack climate stats into explicit 2x2 rows
This commit is contained in:
parent
4efd28c956
commit
e53933ece7
@ -1527,14 +1527,11 @@ def build_overview():
|
|||||||
42,
|
42,
|
||||||
"Current Climate",
|
"Current Climate",
|
||||||
CLIMATE_CURRENT_ROW_TOP_EXPR,
|
CLIMATE_CURRENT_ROW_TOP_EXPR,
|
||||||
{"h": 6, "w": 6, "x": 0, "y": 12},
|
{"h": 3, "w": 6, "x": 0, "y": 12},
|
||||||
unit="none",
|
unit="none",
|
||||||
decimals=2,
|
decimals=2,
|
||||||
text_mode="name_and_value",
|
text_mode="name_and_value",
|
||||||
targets=[
|
legend="{{metric}}",
|
||||||
{"expr": CLIMATE_CURRENT_ROW_TOP_EXPR, "refId": "A", "legendFormat": "{{metric}}", "instant": True},
|
|
||||||
{"expr": CLIMATE_CURRENT_ROW_BOTTOM_EXPR, "refId": "B", "legendFormat": "{{metric}}", "instant": True},
|
|
||||||
],
|
|
||||||
instant=True,
|
instant=True,
|
||||||
field_overrides=[
|
field_overrides=[
|
||||||
{"matcher": {"id": "byName", "options": "Temp °C"}, "properties": [{"id": "unit", "value": "celsius"}]},
|
{"matcher": {"id": "byName", "options": "Temp °C"}, "properties": [{"id": "unit", "value": "celsius"}]},
|
||||||
@ -1550,6 +1547,30 @@ def build_overview():
|
|||||||
value_size=28,
|
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(
|
panels.append(
|
||||||
timeseries_panel(
|
timeseries_panel(
|
||||||
43,
|
43,
|
||||||
|
|||||||
@ -1241,7 +1241,7 @@
|
|||||||
"uid": "atlas-vm"
|
"uid": "atlas-vm"
|
||||||
},
|
},
|
||||||
"gridPos": {
|
"gridPos": {
|
||||||
"h": 6,
|
"h": 3,
|
||||||
"w": 6,
|
"w": 6,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 12
|
"y": 12
|
||||||
@ -1252,12 +1252,6 @@
|
|||||||
"refId": "A",
|
"refId": "A",
|
||||||
"legendFormat": "{{metric}}",
|
"legendFormat": "{{metric}}",
|
||||||
"instant": true
|
"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": {
|
"fieldConfig": {
|
||||||
@ -1364,6 +1358,124 @@
|
|||||||
],
|
],
|
||||||
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
|
"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,
|
"id": 43,
|
||||||
"type": "timeseries",
|
"type": "timeseries",
|
||||||
|
|||||||
@ -1250,7 +1250,7 @@ data:
|
|||||||
"uid": "atlas-vm"
|
"uid": "atlas-vm"
|
||||||
},
|
},
|
||||||
"gridPos": {
|
"gridPos": {
|
||||||
"h": 6,
|
"h": 3,
|
||||||
"w": 6,
|
"w": 6,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 12
|
"y": 12
|
||||||
@ -1261,12 +1261,6 @@ data:
|
|||||||
"refId": "A",
|
"refId": "A",
|
||||||
"legendFormat": "{{metric}}",
|
"legendFormat": "{{metric}}",
|
||||||
"instant": true
|
"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": {
|
"fieldConfig": {
|
||||||
@ -1373,6 +1367,124 @@ data:
|
|||||||
],
|
],
|
||||||
"description": "Current tent values: Temp \u00b0C, Temp \u00b0F, Humidity, Pressure."
|
"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,
|
"id": 43,
|
||||||
"type": "timeseries",
|
"type": "timeseries",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user