diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index f775ef15..50c8670f 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -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( diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 2337ce5e..23a6b6d7 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -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, diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index e6f5650d..9336299c 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -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,