blob: a8550e0f74752b9fc15397c00c723a6e6e3aaf02 [file] [log] [blame]
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 12,
"iteration": 1650627258965,
"links": [],
"panels": [
{
"datasource": "mysql",
"description": "Number of builds executed in the selected time range",
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 0
},
"id": 4,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS time,\n count(*)\nFROM \n builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"project_id"
],
"type": "column"
}
]
],
"table": "gitlab_commits",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "1. Total Number of Builds [Selected Time Range]",
"type": "stat"
},
{
"datasource": "mysql",
"description": "Number of successful builds / Number of total builds",
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"unit": "percentunit"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 0
},
"id": 6,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS time,\n 1.0 * count(case when b.status = 'SUCCESS' then 1 else null end)/count(*)\nFROM builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"project_id"
],
"type": "column"
}
]
],
"table": "gitlab_commits",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "2. Mean Build Success Rate",
"type": "stat"
},
{
"cacheTimeout": null,
"datasource": "mysql",
"description": "The percentage of successful, failed, and aborted builds.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"decimals": 0,
"mappings": [],
"unit": "none"
},
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"build_count"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 6,
"x": 12,
"y": 0
},
"id": 37,
"interval": null,
"links": [],
"options": {
"displayLabels": [
"value",
"percent"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"values": [
"percent",
"value"
]
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": true
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS time,\n status,\n count(*) as build_count\nFROM builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\nGROUP BY 1,2\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"project_id"
],
"type": "column"
}
]
],
"table": "gitlab_commits",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "3. Total Build Result Distribution",
"type": "piechart"
},
{
"datasource": "mysql",
"description": "Number of successful builds / Number of total builds",
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "light-orange",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 18,
"y": 0
},
"id": 55,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n now() AS time,\n avg(duration_sec/60) as duration_in_minute\nFROM builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"project_id"
],
"type": "column"
}
]
],
"table": "gitlab_commits",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "4. Mean Build Duration in Minutes",
"type": "stat"
},
{
"datasource": "mysql",
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Build Count",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 6
},
"id": 52,
"options": {
"barWidth": 0.5,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "with _builds as(\n SELECT\n DATE_ADD(date(b.started_date), INTERVAL -DAYOFMONTH(date(b.started_date))+1 DAY) as time,\n count(*) as build_count\n FROM builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\n group by 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n build_count as \"Build Count\"\nFROM _builds\nORDER BY time\n",
"refId": "A",
"select": [
[
{
"params": [
"id"
],
"type": "column"
}
]
],
"table": "ae_projects",
"timeColumn": "ae_create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "1.1 Total Number of Builds [Each Month]",
"type": "barchart"
},
{
"datasource": "mysql",
"description": "1. Mean Build success rate over time.\n2. The builds being calculated are filtered by \"build starting time\" (time filter at the upper-right corner) and \"Jira board\" (\"Choose Board\" filter at the upper-left corner)",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Build Success Rate(%)",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Build Success Rate"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 6
},
"id": 50,
"interval": "",
"options": {
"barWidth": 0.5,
"groupWidth": 0.7,
"legend": {
"calcs": [
"mean"
],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "with _build_success_rate as(\r\n SELECT\r\n DATE_ADD(date(b.started_date), INTERVAL -DAYOFMONTH(date(b.started_date))+1 DAY) as time,\r\n b.status\r\n FROM\r\n builds b\r\n join jobs j on b.job_id = j.id \r\nWHERE\r\n $__timeFilter(b.started_date)\r\n and j.id in ($job_id)\r\n)\r\n\r\nSELECT \r\n date_format(time,'%M %Y') as month,\r\n 1.0 * sum(case when status = 'SUCCESS' then 1 else 0 end)/ count(*) as \"Build Success Rate\"\r\nFROM _build_success_rate\r\ngroup by 1\r\norder by 1",
"refId": "A",
"select": [
[
{
"params": [
"progress"
],
"type": "column"
}
]
],
"table": "ca_analysis",
"timeColumn": "create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "2.1 Build Success Rate [Each Month]",
"type": "barchart"
},
{
"datasource": "mysql",
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed"
},
"custom": {
"axisLabel": "Build Count",
"axisPlacement": "auto",
"barAlignment": 1,
"drawStyle": "bars",
"fillOpacity": 50,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "successful_build_count"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "green",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "failed_build_count"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 12
},
"id": 54,
"options": {
"legend": {
"calcs": [
"sum"
],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "multi"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n DATE_ADD(date(b.started_date), INTERVAL -DAYOFMONTH(date(b.started_date))+1 DAY) as time,\n count(distinct case when b.status = 'SUCCESS' then b.id else null end) as successful_build_count,\n count(distinct case when b.status != 'SUCCESS' then b.id else null end) as failed_build_count\nFROM builds b\n join jobs j on b.job_id = j.id\nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\ngroup by 1",
"refId": "A",
"select": [
[
{
"params": [
"id"
],
"type": "column"
}
]
],
"table": "ae_projects",
"timeColumn": "ae_create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "3.1 Number of Successful and Failed Builds [Each Month]",
"type": "timeseries"
},
{
"datasource": "mysql",
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Build Count",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
},
{
"color": "red",
"value": 60
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "duration_in_minute"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-orange",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 18
},
"id": 56,
"options": {
"barWidth": 0.5,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"text": {
"valueSize": 12
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.0.6",
"targets": [
{
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "with _builds as(\n SELECT\n DATE_ADD(date(started_date), INTERVAL -DAYOFMONTH(date(started_date))+1 DAY) as time,\n avg(duration_sec) as duration\n FROM \n builds b\n join jobs j on b.job_id = j.id \nWHERE\n $__timeFilter(b.started_date)\n and j.id in ($job_id)\n group by 1\n)\n\nSELECT \n date_format(time,'%M %Y') as month,\n duration/60 as duration_in_minute\nFROM _builds\nORDER BY time\n",
"refId": "A",
"select": [
[
{
"params": [
"id"
],
"type": "column"
}
]
],
"table": "ae_projects",
"timeColumn": "ae_create_time",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "4.1 Mean Build Duration in Minutes [Each Month]",
"type": "barchart"
}
],
"schemaVersion": 30,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": "mysql",
"definition": "select concat(name, '--', id) as text from jobs ",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Job Name",
"multi": true,
"name": "job_id",
"options": [],
"query": "select concat(name, '--', id) as text from jobs ",
"refresh": 1,
"regex": "/^(?<text>.*)--(?<value>.*)$/",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6M",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Jenkins",
"uid": "W8AiDFQnk",
"version": 2
}