monitoring(overview): make jenkins success/failure lists readable

This commit is contained in:
Brad Stein 2026-04-13 14:24:52 -03:00
parent 7f676fdc70
commit cf988e361b
3 changed files with 38 additions and 56 deletions

View File

@ -496,6 +496,12 @@ JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS = (
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS = (
"(time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600"
)
JENKINS_BUILD_WEATHER_LAST_SUCCESS_NEWEST_6_HOURS = (
f"sort(bottomk(6, {JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS}))"
)
JENKINS_BUILD_WEATHER_LAST_FAILURE_NEWEST_6_HOURS = (
f"sort(bottomk(6, {JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS}))"
)
JENKINS_BUILD_WEATHER_LAST_DURATION_MINUTES = (
"ariadne_jenkins_build_weather_job_last_duration_seconds / 60"
)
@ -2183,14 +2189,14 @@ def build_overview():
jenkins_weather_statlist_panel(
142,
"Jenkins Last Success (h, newest first)",
JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS,
JENKINS_BUILD_WEATHER_LAST_SUCCESS_NEWEST_6_HOURS,
{"h": 5, "w": 4, "x": 8, "y": 32},
unit="h",
decimals=1,
sort_order="asc",
limit=6,
title_size=11,
value_size=11,
limit=None,
title_size=12,
value_size=12,
links=link_to("atlas-jobs"),
description="Age since each job's most recent successful run; newest runs appear first.",
)
@ -2199,14 +2205,14 @@ def build_overview():
jenkins_weather_statlist_panel(
243,
"Jenkins Last Failure (h, newest first)",
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS,
JENKINS_BUILD_WEATHER_LAST_FAILURE_NEWEST_6_HOURS,
{"h": 5, "w": 4, "x": 12, "y": 32},
unit="h",
decimals=1,
sort_order="asc",
limit=6,
title_size=11,
value_size=11,
limit=None,
title_size=12,
value_size=12,
links=link_to("atlas-jobs"),
description="Age since each job's most recent failed run; newest failures appear first.",
)

View File

@ -2298,25 +2298,25 @@
"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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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
}
@ -2412,8 +2412,8 @@
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
"titleSize": 12,
"valueSize": 12
}
},
"transformations": [
@ -2425,12 +2425,6 @@
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 6
}
}
],
"links": [
@ -2459,25 +2453,25 @@
"targets": [
{
"refId": "A",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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
}
@ -2573,8 +2567,8 @@
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
"titleSize": 12,
"valueSize": 12
}
},
"transformations": [
@ -2586,12 +2580,6 @@
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 6
}
}
],
"links": [

View File

@ -2307,25 +2307,25 @@ data:
"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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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)",
"expr": "(sort(bottomk(6, (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
}
@ -2421,8 +2421,8 @@ data:
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
"titleSize": 12,
"valueSize": 12
}
},
"transformations": [
@ -2434,12 +2434,6 @@ data:
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 6
}
}
],
"links": [
@ -2468,25 +2462,25 @@ data:
"targets": [
{
"refId": "A",
"expr": "((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 1)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 0)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status == 2)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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_failure_timestamp_seconds) / 3600) and on(exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status < 0)",
"expr": "(sort(bottomk(6, (time() - ariadne_jenkins_build_weather_job_last_failure_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
}
@ -2582,8 +2576,8 @@ data:
},
"textMode": "name_and_value",
"text": {
"titleSize": 11,
"valueSize": 11
"titleSize": 12,
"valueSize": 12
}
},
"transformations": [
@ -2595,12 +2589,6 @@ data:
],
"order": "asc"
}
},
{
"id": "limit",
"options": {
"limit": 6
}
}
],
"links": [