monitoring(overview): make jenkins success/failure panels scrollable lists
This commit is contained in:
parent
3bbd0a6f90
commit
e437f55d87
@ -505,12 +505,6 @@ JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS_BY_JOB = (
|
|||||||
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB = (
|
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB = (
|
||||||
f"min by (exported_job,job_url,weather_icon) ({JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS})"
|
f"min by (exported_job,job_url,weather_icon) ({JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS})"
|
||||||
)
|
)
|
||||||
JENKINS_BUILD_WEATHER_LAST_SUCCESS_NEWEST_6_HOURS = (
|
|
||||||
f"sort(bottomk(6, {JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS_BY_JOB}))"
|
|
||||||
)
|
|
||||||
JENKINS_BUILD_WEATHER_LAST_FAILURE_NEWEST_6_HOURS = (
|
|
||||||
f"sort(bottomk(6, {JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB}))"
|
|
||||||
)
|
|
||||||
JENKINS_BUILD_WEATHER_LAST_DURATION_MINUTES = (
|
JENKINS_BUILD_WEATHER_LAST_DURATION_MINUTES = (
|
||||||
"ariadne_jenkins_build_weather_job_last_duration_seconds / 60"
|
"ariadne_jenkins_build_weather_job_last_duration_seconds / 60"
|
||||||
)
|
)
|
||||||
@ -1614,6 +1608,79 @@ def jenkins_weather_statlist_panel(
|
|||||||
return panel
|
return panel
|
||||||
|
|
||||||
|
|
||||||
|
def jenkins_weather_scroll_table_panel(
|
||||||
|
panel_id,
|
||||||
|
title,
|
||||||
|
expr,
|
||||||
|
grid,
|
||||||
|
*,
|
||||||
|
unit="h",
|
||||||
|
decimals=1,
|
||||||
|
sort_order="asc",
|
||||||
|
links=None,
|
||||||
|
description=None,
|
||||||
|
):
|
||||||
|
table = table_panel(
|
||||||
|
panel_id,
|
||||||
|
title,
|
||||||
|
expr,
|
||||||
|
grid,
|
||||||
|
unit=unit,
|
||||||
|
instant=True,
|
||||||
|
format="table",
|
||||||
|
filterable=False,
|
||||||
|
options={"showHeader": False, "columnFilters": False, "cellHeight": "sm"},
|
||||||
|
footer={"show": False, "fields": "", "calcs": []},
|
||||||
|
transformations=[
|
||||||
|
{"id": "labelsToFields", "options": {}},
|
||||||
|
{"id": "sortBy", "options": {"fields": ["Value"], "order": sort_order}},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {"Time": True, "job_url": True},
|
||||||
|
"renameByName": {"weather_icon": "", "exported_job": "Job", "Value": "h"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
field_overrides=[
|
||||||
|
{
|
||||||
|
"matcher": {"id": "byName", "options": "weather_icon"},
|
||||||
|
"properties": [
|
||||||
|
{"id": "custom.width", "value": 26},
|
||||||
|
{"id": "custom.align", "value": "center"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": {"id": "byName", "options": "exported_job"},
|
||||||
|
"properties": [
|
||||||
|
{"id": "custom.width", "value": 190},
|
||||||
|
{
|
||||||
|
"id": "links",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"title": "Open Jenkins job",
|
||||||
|
"url": "${__data.fields.job_url}",
|
||||||
|
"targetBlank": True,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": {"id": "byName", "options": "Value"},
|
||||||
|
"properties": [
|
||||||
|
{"id": "decimals", "value": decimals},
|
||||||
|
{"id": "custom.width", "value": 74},
|
||||||
|
{"id": "custom.align", "value": "right"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
links=links,
|
||||||
|
description=description,
|
||||||
|
)
|
||||||
|
return table
|
||||||
|
|
||||||
|
|
||||||
def text_panel(panel_id, title, content, grid):
|
def text_panel(panel_id, title, content, grid):
|
||||||
return {
|
return {
|
||||||
"id": panel_id,
|
"id": panel_id,
|
||||||
@ -2195,35 +2262,35 @@ def build_overview():
|
|||||||
)
|
)
|
||||||
panels.append(test_success)
|
panels.append(test_success)
|
||||||
panels.append(
|
panels.append(
|
||||||
jenkins_weather_statlist_panel(
|
jenkins_weather_scroll_table_panel(
|
||||||
142,
|
142,
|
||||||
"Jenkins Last Success (h, newest first)",
|
"Jenkins Last Success (h, newest first)",
|
||||||
JENKINS_BUILD_WEATHER_LAST_SUCCESS_NEWEST_6_HOURS,
|
JENKINS_BUILD_WEATHER_LAST_SUCCESS_AGE_HOURS_BY_JOB,
|
||||||
{"h": 5, "w": 4, "x": 8, "y": 32},
|
{"h": 5, "w": 4, "x": 8, "y": 32},
|
||||||
unit="h",
|
unit="h",
|
||||||
decimals=1,
|
decimals=1,
|
||||||
sort_order="asc",
|
sort_order="asc",
|
||||||
limit=None,
|
|
||||||
title_size=12,
|
|
||||||
value_size=12,
|
|
||||||
links=link_to("atlas-jobs"),
|
links=link_to("atlas-jobs"),
|
||||||
description="Age since each job's most recent successful run; newest runs appear first.",
|
description=(
|
||||||
|
"Scrollable list of all Jenkins jobs ordered by age since most recent successful run "
|
||||||
|
"(newest first)."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels.append(
|
panels.append(
|
||||||
jenkins_weather_statlist_panel(
|
jenkins_weather_scroll_table_panel(
|
||||||
243,
|
243,
|
||||||
"Jenkins Last Failure (h, newest first)",
|
"Jenkins Last Failure (h, newest first)",
|
||||||
JENKINS_BUILD_WEATHER_LAST_FAILURE_NEWEST_6_HOURS,
|
JENKINS_BUILD_WEATHER_LAST_FAILURE_AGE_HOURS_BY_JOB,
|
||||||
{"h": 5, "w": 4, "x": 12, "y": 32},
|
{"h": 5, "w": 4, "x": 12, "y": 32},
|
||||||
unit="h",
|
unit="h",
|
||||||
decimals=1,
|
decimals=1,
|
||||||
sort_order="asc",
|
sort_order="asc",
|
||||||
limit=None,
|
|
||||||
title_size=12,
|
|
||||||
value_size=12,
|
|
||||||
links=link_to("atlas-jobs"),
|
links=link_to("atlas-jobs"),
|
||||||
description="Age since each job's most recent failed run; newest failures appear first.",
|
description=(
|
||||||
|
"Scrollable list of all Jenkins jobs ordered by age since most recent failed run "
|
||||||
|
"(newest first)."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
panels.append(
|
panels.append(
|
||||||
|
|||||||
@ -2283,7 +2283,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 142,
|
"id": 142,
|
||||||
"type": "stat",
|
"type": "table",
|
||||||
"title": "Jenkins Last Success (h, newest first)",
|
"title": "Jenkins Last Success (h, newest first)",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
@ -2297,126 +2297,95 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"expr": "min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
|
"instant": true,
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
"format": "table"
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "B",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "C",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "D",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "h",
|
"unit": "h",
|
||||||
"decimals": 1,
|
"custom": {
|
||||||
"min": 0,
|
"filterable": false
|
||||||
"links": [
|
}
|
||||||
{
|
|
||||||
"title": "Open Jenkins job",
|
|
||||||
"url": "${__field.labels.job_url}",
|
|
||||||
"targetBlank": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "A"
|
"options": "weather_icon"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 26
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "green"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "center"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "B"
|
"options": "exported_job"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 190
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "red"
|
{
|
||||||
}
|
"id": "links",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"title": "Open Jenkins job",
|
||||||
|
"url": "${__data.fields.job_url}",
|
||||||
|
"targetBlank": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "C"
|
"options": "Value"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "decimals",
|
||||||
"value": {
|
"value": 1
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "yellow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byFrameRefID",
|
|
||||||
"options": "D"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 74
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "gray"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "right"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"showHeader": false,
|
||||||
"graphMode": "none",
|
"columnFilters": false,
|
||||||
"justifyMode": "left",
|
"cellHeight": "sm",
|
||||||
"orientation": "horizontal",
|
"footer": {
|
||||||
"wideLayout": true,
|
"show": false,
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"calcs": []
|
||||||
},
|
|
||||||
"textMode": "name_and_value",
|
|
||||||
"text": {
|
|
||||||
"titleSize": 12,
|
|
||||||
"valueSize": 12
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
|
{
|
||||||
|
"id": "labelsToFields",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
@ -2425,6 +2394,20 @@
|
|||||||
],
|
],
|
||||||
"order": "asc"
|
"order": "asc"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {
|
||||||
|
"Time": true,
|
||||||
|
"job_url": true
|
||||||
|
},
|
||||||
|
"renameByName": {
|
||||||
|
"weather_icon": "",
|
||||||
|
"exported_job": "Job",
|
||||||
|
"Value": "h"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
@ -2434,11 +2417,11 @@
|
|||||||
"targetBlank": true
|
"targetBlank": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Age since each job's most recent successful run; newest runs appear first."
|
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent successful run (newest first)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 243,
|
"id": 243,
|
||||||
"type": "stat",
|
"type": "table",
|
||||||
"title": "Jenkins Last Failure (h, newest first)",
|
"title": "Jenkins Last Failure (h, newest first)",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
@ -2452,126 +2435,95 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"expr": "min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
|
"instant": true,
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
"format": "table"
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "B",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "C",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "D",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "h",
|
"unit": "h",
|
||||||
"decimals": 1,
|
"custom": {
|
||||||
"min": 0,
|
"filterable": false
|
||||||
"links": [
|
}
|
||||||
{
|
|
||||||
"title": "Open Jenkins job",
|
|
||||||
"url": "${__field.labels.job_url}",
|
|
||||||
"targetBlank": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "A"
|
"options": "weather_icon"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 26
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "green"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "center"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "B"
|
"options": "exported_job"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 190
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "red"
|
{
|
||||||
}
|
"id": "links",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"title": "Open Jenkins job",
|
||||||
|
"url": "${__data.fields.job_url}",
|
||||||
|
"targetBlank": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "C"
|
"options": "Value"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "decimals",
|
||||||
"value": {
|
"value": 1
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "yellow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byFrameRefID",
|
|
||||||
"options": "D"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 74
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "gray"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "right"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"showHeader": false,
|
||||||
"graphMode": "none",
|
"columnFilters": false,
|
||||||
"justifyMode": "left",
|
"cellHeight": "sm",
|
||||||
"orientation": "horizontal",
|
"footer": {
|
||||||
"wideLayout": true,
|
"show": false,
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"calcs": []
|
||||||
},
|
|
||||||
"textMode": "name_and_value",
|
|
||||||
"text": {
|
|
||||||
"titleSize": 12,
|
|
||||||
"valueSize": 12
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
|
{
|
||||||
|
"id": "labelsToFields",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
@ -2580,6 +2532,20 @@
|
|||||||
],
|
],
|
||||||
"order": "asc"
|
"order": "asc"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {
|
||||||
|
"Time": true,
|
||||||
|
"job_url": true
|
||||||
|
},
|
||||||
|
"renameByName": {
|
||||||
|
"weather_icon": "",
|
||||||
|
"exported_job": "Job",
|
||||||
|
"Value": "h"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
@ -2589,7 +2555,7 @@
|
|||||||
"targetBlank": true
|
"targetBlank": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Age since each job's most recent failed run; newest failures appear first."
|
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent failed run (newest first)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 47,
|
"id": 47,
|
||||||
|
|||||||
@ -2292,7 +2292,7 @@ data:
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 142,
|
"id": 142,
|
||||||
"type": "stat",
|
"type": "table",
|
||||||
"title": "Jenkins Last Success (h, newest first)",
|
"title": "Jenkins Last Success (h, newest first)",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
@ -2306,126 +2306,95 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"expr": "min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
|
"instant": true,
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
"format": "table"
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "B",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "C",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "D",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_success_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "h",
|
"unit": "h",
|
||||||
"decimals": 1,
|
"custom": {
|
||||||
"min": 0,
|
"filterable": false
|
||||||
"links": [
|
}
|
||||||
{
|
|
||||||
"title": "Open Jenkins job",
|
|
||||||
"url": "${__field.labels.job_url}",
|
|
||||||
"targetBlank": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "A"
|
"options": "weather_icon"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 26
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "green"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "center"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "B"
|
"options": "exported_job"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 190
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "red"
|
{
|
||||||
}
|
"id": "links",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"title": "Open Jenkins job",
|
||||||
|
"url": "${__data.fields.job_url}",
|
||||||
|
"targetBlank": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "C"
|
"options": "Value"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "decimals",
|
||||||
"value": {
|
"value": 1
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "yellow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byFrameRefID",
|
|
||||||
"options": "D"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 74
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "gray"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "right"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"showHeader": false,
|
||||||
"graphMode": "none",
|
"columnFilters": false,
|
||||||
"justifyMode": "left",
|
"cellHeight": "sm",
|
||||||
"orientation": "horizontal",
|
"footer": {
|
||||||
"wideLayout": true,
|
"show": false,
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"calcs": []
|
||||||
},
|
|
||||||
"textMode": "name_and_value",
|
|
||||||
"text": {
|
|
||||||
"titleSize": 12,
|
|
||||||
"valueSize": 12
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
|
{
|
||||||
|
"id": "labelsToFields",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
@ -2434,6 +2403,20 @@ data:
|
|||||||
],
|
],
|
||||||
"order": "asc"
|
"order": "asc"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {
|
||||||
|
"Time": true,
|
||||||
|
"job_url": true
|
||||||
|
},
|
||||||
|
"renameByName": {
|
||||||
|
"weather_icon": "",
|
||||||
|
"exported_job": "Job",
|
||||||
|
"Value": "h"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
@ -2443,11 +2426,11 @@ data:
|
|||||||
"targetBlank": true
|
"targetBlank": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Age since each job's most recent successful run; newest runs appear first."
|
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent successful run (newest first)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 243,
|
"id": 243,
|
||||||
"type": "stat",
|
"type": "table",
|
||||||
"title": "Jenkins Last Failure (h, newest first)",
|
"title": "Jenkins Last Failure (h, newest first)",
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "prometheus",
|
||||||
@ -2461,126 +2444,95 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
|
"expr": "min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 1)",
|
"instant": true,
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
"format": "table"
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "B",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "C",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) == 2)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"refId": "D",
|
|
||||||
"expr": "(sort(bottomk(6, min by (exported_job,job_url,weather_icon) ((time() - ariadne_jenkins_build_weather_job_last_failure_timestamp_seconds) / 3600)))) and on(exported_job,job_url,weather_icon) (max by (exported_job,job_url,weather_icon) (ariadne_jenkins_build_weather_job_last_status) < 0)",
|
|
||||||
"legendFormat": "{{weather_icon}} {{exported_job}}",
|
|
||||||
"instant": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"unit": "h",
|
"unit": "h",
|
||||||
"decimals": 1,
|
"custom": {
|
||||||
"min": 0,
|
"filterable": false
|
||||||
"links": [
|
}
|
||||||
{
|
|
||||||
"title": "Open Jenkins job",
|
|
||||||
"url": "${__field.labels.job_url}",
|
|
||||||
"targetBlank": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "A"
|
"options": "weather_icon"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 26
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "green"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "center"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "B"
|
"options": "exported_job"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 190
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "red"
|
{
|
||||||
}
|
"id": "links",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"title": "Open Jenkins job",
|
||||||
|
"url": "${__data.fields.job_url}",
|
||||||
|
"targetBlank": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matcher": {
|
"matcher": {
|
||||||
"id": "byFrameRefID",
|
"id": "byName",
|
||||||
"options": "C"
|
"options": "Value"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "decimals",
|
||||||
"value": {
|
"value": 1
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "yellow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byFrameRefID",
|
|
||||||
"options": "D"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
{
|
||||||
"id": "color",
|
"id": "custom.width",
|
||||||
"value": {
|
"value": 74
|
||||||
"mode": "fixed",
|
},
|
||||||
"fixedColor": "gray"
|
{
|
||||||
}
|
"id": "custom.align",
|
||||||
|
"value": "right"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"showHeader": false,
|
||||||
"graphMode": "none",
|
"columnFilters": false,
|
||||||
"justifyMode": "left",
|
"cellHeight": "sm",
|
||||||
"orientation": "horizontal",
|
"footer": {
|
||||||
"wideLayout": true,
|
"show": false,
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"calcs": []
|
||||||
},
|
|
||||||
"textMode": "name_and_value",
|
|
||||||
"text": {
|
|
||||||
"titleSize": 12,
|
|
||||||
"valueSize": 12
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transformations": [
|
"transformations": [
|
||||||
|
{
|
||||||
|
"id": "labelsToFields",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sortBy",
|
"id": "sortBy",
|
||||||
"options": {
|
"options": {
|
||||||
@ -2589,6 +2541,20 @@ data:
|
|||||||
],
|
],
|
||||||
"order": "asc"
|
"order": "asc"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "organize",
|
||||||
|
"options": {
|
||||||
|
"excludeByName": {
|
||||||
|
"Time": true,
|
||||||
|
"job_url": true
|
||||||
|
},
|
||||||
|
"renameByName": {
|
||||||
|
"weather_icon": "",
|
||||||
|
"exported_job": "Job",
|
||||||
|
"Value": "h"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"links": [
|
"links": [
|
||||||
@ -2598,7 +2564,7 @@ data:
|
|||||||
"targetBlank": true
|
"targetBlank": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Age since each job's most recent failed run; newest failures appear first."
|
"description": "Scrollable list of all Jenkins jobs ordered by age since most recent failed run (newest first)."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 47,
|
"id": 47,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user