monitoring(overview): add jenkins success and duration columns

This commit is contained in:
Brad Stein 2026-04-13 05:31:26 -03:00
parent ef352cbdc1
commit db701b89c2
3 changed files with 750 additions and 17 deletions

View File

@ -2150,7 +2150,7 @@ def build_overview():
47,
"PVC Backup Health / Age",
PVC_BACKUP_AGE_HOURS_BY_PVC,
{"h": 5, "w": 8, "x": 16, "y": 32},
{"h": 5, "w": 24, "x": 0, "y": 56},
unit="h",
instant=True,
legend="{{namespace}}/{{pvc}}",
@ -2173,9 +2173,9 @@ def build_overview():
panels.append(
jenkins_weather_bargauge_panel(
142,
"Jenkins Build Weather (last run h, newest first)",
"Jenkins Last Run (hours ago, newest first)",
JENKINS_BUILD_WEATHER_LAST_RUN_AGE_HOURS,
{"h": 5, "w": 8, "x": 8, "y": 32},
{"h": 5, "w": 5, "x": 8, "y": 32},
unit="h",
decimals=2,
sort_order="asc",
@ -2183,11 +2183,48 @@ def build_overview():
thresholds=age_thresholds,
links=link_to("atlas-jobs"),
description=(
"Live Jenkins job weather from Ariadne: icon + name, green/red status color, "
"and last-run age in hours. Click a job bar to open Jenkins."
"Jenkins weather list from Ariadne: icon + name with status color and age since the most recent run."
),
)
)
panels.append(
jenkins_weather_bargauge_panel(
243,
"Jenkins Last Success (hours ago)",
JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS,
{"h": 5, "w": 5, "x": 13, "y": 32},
unit="h",
decimals=2,
sort_order="asc",
limit=8,
thresholds=age_thresholds,
links=link_to("atlas-jobs"),
description="Per-job age since the most recent successful run.",
)
)
panels.append(
jenkins_weather_bargauge_panel(
244,
"Jenkins Last Duration (minutes)",
JENKINS_BUILD_WEATHER_LAST_DURATION_MINUTES,
{"h": 5, "w": 6, "x": 18, "y": 32},
unit="m",
decimals=2,
sort_order="desc",
limit=8,
thresholds={
"mode": "absolute",
"steps": [
{"color": "green", "value": None},
{"color": "yellow", "value": 5},
{"color": "orange", "value": 15},
{"color": "red", "value": 30},
],
},
links=link_to("atlas-jobs"),
description="Most recent completed build duration per Jenkins job.",
)
)
panels.append(
stat_panel(

View File

@ -2636,9 +2636,9 @@
},
"gridPos": {
"h": 5,
"w": 8,
"x": 16,
"y": 32
"w": 24,
"x": 0,
"y": 56
},
"targets": [
{
@ -2711,14 +2711,14 @@
{
"id": 142,
"type": "bargauge",
"title": "Jenkins Build Weather (last run h, newest first)",
"title": "Jenkins Last Run (hours ago, newest first)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 8,
"w": 5,
"x": 8,
"y": 32
},
@ -2880,7 +2880,355 @@
"targetBlank": true
}
],
"description": "Live Jenkins job weather from Ariadne: icon + name, green/red status color, and last-run age in hours. Click a job bar to open Jenkins."
"description": "Jenkins weather list from Ariadne: icon + name with status color and age since the most recent run."
},
{
"id": 243,
"type": "bargauge",
"title": "Jenkins Last Success (hours ago)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 5,
"x": 13,
"y": 32
},
"targets": [
{
"refId": "A",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "B",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "C",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"unit": "h",
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 6
},
{
"color": "orange",
"value": 24
},
{
"color": "red",
"value": 48
}
]
},
"links": [
{
"title": "Open Jenkins job",
"url": "${__field.labels.job_url}",
"targetBlank": true
}
],
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "green"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "B"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "yellow"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "gray"
}
}
]
}
]
},
"options": {
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
}
},
"transformations": [
{
"id": "sortBy",
"options": {
"fields": [
"Value"
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 8
}
}
],
"links": [
{
"title": "Open atlas-jobs dashboard",
"url": "/d/atlas-jobs",
"targetBlank": true
}
],
"description": "Per-job age since the most recent successful run."
},
{
"id": 244,
"type": "bargauge",
"title": "Jenkins Last Duration (minutes)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 6,
"x": 18,
"y": 32
},
"targets": [
{
"refId": "A",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "B",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "C",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"unit": "m",
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 5
},
{
"color": "orange",
"value": 15
},
{
"color": "red",
"value": 30
}
]
},
"links": [
{
"title": "Open Jenkins job",
"url": "${__field.labels.job_url}",
"targetBlank": true
}
],
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "green"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "B"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "yellow"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "gray"
}
}
]
}
]
},
"options": {
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
}
},
"transformations": [
{
"id": "sortBy",
"options": {
"fields": [
"Value"
],
"order": "desc"
}
},
{
"id": "limit",
"options": {
"limit": 8
}
}
],
"links": [
{
"title": "Open atlas-jobs dashboard",
"url": "/d/atlas-jobs",
"targetBlank": true
}
],
"description": "Most recent completed build duration per Jenkins job."
},
{
"id": 30,

View File

@ -2645,9 +2645,9 @@ data:
},
"gridPos": {
"h": 5,
"w": 8,
"x": 16,
"y": 32
"w": 24,
"x": 0,
"y": 56
},
"targets": [
{
@ -2720,14 +2720,14 @@ data:
{
"id": 142,
"type": "bargauge",
"title": "Jenkins Build Weather (last run h, newest first)",
"title": "Jenkins Last Run (hours ago, newest first)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 8,
"w": 5,
"x": 8,
"y": 32
},
@ -2889,7 +2889,355 @@ data:
"targetBlank": true
}
],
"description": "Live Jenkins job weather from Ariadne: icon + name, green/red status color, and last-run age in hours. Click a job bar to open Jenkins."
"description": "Jenkins weather list from Ariadne: icon + name with status color and age since the most recent run."
},
{
"id": 243,
"type": "bargauge",
"title": "Jenkins Last Success (hours ago)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 5,
"x": 13,
"y": 32
},
"targets": [
{
"refId": "A",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "B",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "C",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"unit": "h",
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 6
},
{
"color": "orange",
"value": 24
},
{
"color": "red",
"value": 48
}
]
},
"links": [
{
"title": "Open Jenkins job",
"url": "${__field.labels.job_url}",
"targetBlank": true
}
],
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "green"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "B"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "yellow"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "gray"
}
}
]
}
]
},
"options": {
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
}
},
"transformations": [
{
"id": "sortBy",
"options": {
"fields": [
"Value"
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 8
}
}
],
"links": [
{
"title": "Open atlas-jobs dashboard",
"url": "/d/atlas-jobs",
"targetBlank": true
}
],
"description": "Per-job age since the most recent successful run."
},
{
"id": 244,
"type": "bargauge",
"title": "Jenkins Last Duration (minutes)",
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 5,
"w": 6,
"x": 18,
"y": 32
},
"targets": [
{
"refId": "A",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "B",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "C",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
},
{
"refId": "D",
"expr": "(ariadne_jenkins_build_weather_job_last_duration_seconds / 60) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"legendFormat": "{{weather_icon}} {{exported_job}}",
"instant": true
}
],
"fieldConfig": {
"defaults": {
"unit": "m",
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 5
},
{
"color": "orange",
"value": 15
},
{
"color": "red",
"value": 30
}
]
},
"links": [
{
"title": "Open Jenkins job",
"url": "${__field.labels.job_url}",
"targetBlank": true
}
],
"decimals": 2
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "green"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "B"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "red"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "C"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "yellow"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "D"
},
"properties": [
{
"id": "color",
"value": {
"mode": "fixed",
"fixedColor": "gray"
}
}
]
}
]
},
"options": {
"displayMode": "basic",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
}
},
"transformations": [
{
"id": "sortBy",
"options": {
"fields": [
"Value"
],
"order": "desc"
}
},
{
"id": "limit",
"options": {
"limit": 8
}
}
],
"links": [
{
"title": "Open atlas-jobs dashboard",
"url": "/d/atlas-jobs",
"targetBlank": true
}
],
"description": "Most recent completed build duration per Jenkins job."
},
{
"id": 30,