#apiVersion: v1 #kind: ConfigMap #metadata: # labels: # grafana_dashboard: "1" # name: gitlab-runner-dashboard # namespace: kube-prometheus-stack #data: # gitlab-runner-dashboard.json: |- # { # "annotations": { # "list": [ # { # "builtIn": 1, # "datasource": { # "type": "datasource", # "uid": "grafana" # }, # "enable": true, # "hide": true, # "iconColor": "rgba(0, 211, 255, 1)", # "name": "Annotations & Alerts", # "target": { # "limit": 100, # "matchAny": false, # "tags": [], # "type": "dashboard" # }, # "type": "dashboard" # } # ] # }, # "description": "This dashboard leverages the Prometheus exporter I wrote to fetch information about GitLab CI pipelines statuses. More information here: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter", # "editable": true, # "fiscalYearStartMonth": 0, # "gnetId": 10620, # "graphTooltip": 0, # "id": 28, # "links": [], # "liveNow": false, # "panels": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "gridPos": { # "h": 3, # "w": 2, # "x": 0, # "y": 0 # }, # "id": 116, # "options": { # "content": "

", # "mode": "html" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "refId": "A" # } # ], # "transparent": true, # "type": "text" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "decimals": 0, # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "semi-dark-blue", # "value": null # }, # { # "color": "#d44a3a" # } # ] # }, # "unit": "none" # }, # "overrides": [] # }, # "gridPos": { # "h": 3, # "w": 2, # "x": 2, # "y": 0 # }, # "id": 107, # "links": [], # "maxDataPoints": 100, # "options": { # "colorMode": "background", # "fieldOptions": { # "calcs": [ # "lastNotNull" # ] # }, # "graphMode": "area", # "justifyMode": "auto", # "orientation": "horizontal", # "reduceOptions": { # "calcs": [ # "last" # ], # "fields": "", # "values": false # }, # "textMode": "auto" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "count(gitlab_ci_pipeline_run_count{project=~\"$PROJECT\", ref=~\"$REF\"})", # "format": "time_series", # "instant": false, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # } # ], # "title": "PIPELINES #", # "type": "stat" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "decimals": 0, # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "#299c46", # "value": null # }, # { # "color": "#C4162A", # "value": 1 # }, # { # "color": "#d44a3a" # } # ] # }, # "unit": "none" # }, # "overrides": [] # }, # "gridPos": { # "h": 3, # "w": 2, # "x": 4, # "y": 0 # }, # "id": 117, # "links": [], # "maxDataPoints": 100, # "options": { # "colorMode": "background", # "fieldOptions": { # "calcs": [ # "lastNotNull" # ] # }, # "graphMode": "area", # "justifyMode": "auto", # "orientation": "horizontal", # "reduceOptions": { # "calcs": [ # "last" # ], # "fields": "", # "values": false # }, # "textMode": "auto" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "count(gitlab_ci_pipeline_status{status=\"failed\", project=~\"$PROJECT\", ref=~\"$REF\"} > 0) or vector(0)", # "format": "time_series", # "instant": false, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # } # ], # "title": "FAILED PIPELINES #", # "type": "stat" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "decimals": 0, # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "semi-dark-blue", # "value": null # }, # { # "color": "#d44a3a" # } # ] # }, # "unit": "none" # }, # "overrides": [] # }, # "gridPos": { # "h": 3, # "w": 3, # "x": 6, # "y": 0 # }, # "id": 118, # "links": [], # "maxDataPoints": 100, # "options": { # "colorMode": "background", # "fieldOptions": { # "calcs": [ # "lastNotNull" # ] # }, # "graphMode": "area", # "justifyMode": "auto", # "orientation": "horizontal", # "reduceOptions": { # "calcs": [ # "last" # ], # "fields": "", # "values": false # }, # "textMode": "auto" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "sum(increase(gitlab_ci_pipeline_run_count{project=~\"$PROJECT\", ref=~\"$REF\"}[1h]))", # "format": "time_series", # "instant": false, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # } # ], # "title": "RUNS # (in the last hour)", # "type": "stat" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ] # }, # "overrides": [] # }, # "gridPos": { # "h": 6, # "w": 15, # "x": 9, # "y": 0 # }, # "id": 110, # "links": [], # "mappingTypes": [ # { # "name": "value to text", # "value": 1 # }, # { # "name": "range to text", # "value": 2 # } # ], # "options": { # "autoSizeColumns": true, # "autoSizePolygons": true, # "autoSizeRows": true, # "compositeConfig": { # "animationSpeed": "2500", # "composites": [], # "enabled": true # }, # "ellipseCharacters": 18, # "ellipseEnabled": false, # "globalAutoScaleFonts": true, # "globalClickthrough": "", # "globalClickthroughNewTabEnabled": false, # "globalClickthroughSanitizedEnabled": false, # "globalDecimals": 2, # "globalDisplayMode": "all", # "globalDisplayTextTriggeredEmpty": "OK", # "globalFillColor": "#0a50a1", # "globalFontSize": 4, # "globalGradientsEnabled": true, # "globalOperator": "last", # "globalPolygonBorderColor": "#10111c", # "globalPolygonBorderSize": 1, # "globalPolygonSize": 50, # "globalRegexPattern": "", # "globalShape": "hexagon_pointed_top", # "globalShowValueEnabled": true, # "globalTextFontAutoColor": "#000000", # "globalTextFontAutoColorEnabled": true, # "globalTextFontColor": "", # "globalThresholdsConfig": [], # "globalTooltipsEnabled": true, # "globalTooltipsShowTimestampEnabled": true, # "globalUnitFormat": "short", # "layoutDisplayLimit": 100, # "layoutNumColumns": 8, # "layoutNumRows": 4, # "overrideConfig": { # "overrides": [ # { # "alias": "", # "clickThrough": "", # "clickThroughOpenNewTab": true, # "clickThroughSanitize": true, # "colors": [ # "#299c46", # "#e5ac0e", # "#bf1b00", # "#ffffff" # ], # "decimals": "", # "enabled": true, # "label": "OVERRIDE 1", # "metricName": "/.*/", # "operatorName": "last", # "order": 0, # "prefix": "", # "scaledDecimals": 0, # "suffix": "", # "thresholds": [], # "unitFormat": "short" # } # ] # }, # "panelId": 0, # "radius": 100, # "sortByDirection": 1, # "sortByField": "name", # "tooltipDisplayMode": "all", # "tooltipDisplayTextTriggeredEmpty": "OK", # "tooltipPrimarySortByField": "thresholdLevel", # "tooltipPrimarySortDirection": 2, # "tooltipSecondarySortByField": "value", # "tooltipSecondarySortDirection": 2 # }, # "pluginVersion": "2.0.1", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "(gitlab_ci_pipeline_status{status=\"success\", project=~\"$PROJECT\", ref=~\"$REF\"} * 1 > 0) or (gitlab_ci_pipeline_status{status=\"running\", project=~\"$PROJECT\", ref=~\"$REF\"} * 2 > 0) or (gitlab_ci_pipeline_status{status=~\"failed|canceled\", project=~\"$PROJECT\", ref=~\"$REF\"} * 3 > 0) or (gitlab_ci_pipeline_status{status!~\"success|running|failed|canceled\", project=~\"$PROJECT\", ref=~\"$REF\"} * 4 > 0)", # "format": "time_series", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": " {{project}} - {{ref}}", # "refId": "A" # } # ], # "transparent": true, # "type": "grafana-polystat-panel" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "decimals": 0, # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "#299c46", # "value": null # }, # { # "color": "rgba(237, 129, 40, 0.89)", # "value": 5184000 # }, # { # "color": "#C4162A", # "value": 15552000 # } # ] # }, # "unit": "dtdurations" # }, # "overrides": [] # }, # "gridPos": { # "h": 3, # "w": 5, # "x": 0, # "y": 3 # }, # "id": 108, # "links": [], # "maxDataPoints": 100, # "options": { # "colorMode": "background", # "fieldOptions": { # "calcs": [ # "lastNotNull" # ] # }, # "graphMode": "area", # "justifyMode": "center", # "orientation": "horizontal", # "reduceOptions": { # "calcs": [ # "lastNotNull" # ], # "fields": "/^Value$/", # "values": false # }, # "textMode": "auto" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "avg(time() - gitlab_ci_pipeline_timestamp{project=~\"$PROJECT\", ref=~\"$REF\"})", # "format": "time_series", # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # } # ], # "title": "Average Pipeline Run Frequency", # "type": "stat" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "decimals": 0, # "mappings": [ # { # "options": { # "match": "null", # "result": { # "text": "N/A" # } # }, # "type": "special" # } # ], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "#299c46", # "value": null # }, # { # "color": "rgba(237, 129, 40, 0.89)", # "value": 600 # }, # { # "color": "#d44a3a", # "value": 900 # } # ] # }, # "unit": "dtdurations" # }, # "overrides": [] # }, # "gridPos": { # "h": 3, # "w": 4, # "x": 5, # "y": 3 # }, # "id": 106, # "links": [], # "maxDataPoints": 100, # "options": { # "colorMode": "background", # "fieldOptions": { # "calcs": [ # "lastNotNull" # ] # }, # "graphMode": "area", # "justifyMode": "auto", # "orientation": "horizontal", # "reduceOptions": { # "calcs": [ # "lastNotNull" # ], # "fields": "", # "values": false # }, # "textMode": "auto" # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "avg(gitlab_ci_pipeline_duration_seconds{project=~\"$PROJECT\", ref=~\"$REF\"})", # "format": "time_series", # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # } # ], # "title": "Average Pipeline Duration", # "type": "stat" # }, # { # "aliasColors": {}, # "bars": true, # "dashLength": 10, # "dashes": false, # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "description": "", # "fill": 1, # "fillGradient": 0, # "gridPos": { # "h": 4, # "w": 12, # "x": 0, # "y": 6 # }, # "hiddenSeries": false, # "id": 114, # "legend": { # "alignAsTable": true, # "avg": false, # "current": false, # "hideZero": true, # "max": false, # "min": false, # "rightSide": true, # "show": true, # "total": false, # "values": false # }, # "lines": false, # "linewidth": 1, # "nullPointMode": "null as zero", # "options": { # "alertThreshold": false # }, # "percentage": false, # "pluginVersion": "9.1.6", # "pointradius": 2, # "points": false, # "renderer": "flot", # "seriesOverrides": [], # "spaceLength": 10, # "stack": true, # "steppedLine": false, # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "sum(increase(gitlab_ci_pipeline_run_count{project=~\"$PROJECT\", ref=~\"$REF\"}[1m])) by (project, ref) / sum(increase(gitlab_ci_pipeline_run_count{project=~\"$PROJECT\", ref=~\"$REF\"}[1m])) by (project, ref)", # "format": "time_series", # "instant": false, # "interval": "", # "legendFormat": "{{ project }} - {{ ref }}", # "refId": "A" # } # ], # "thresholds": [], # "timeRegions": [], # "title": "PIPELINE RUNS", # "tooltip": { # "shared": true, # "sort": 0, # "value_type": "individual" # }, # "type": "graph", # "xaxis": { # "mode": "time", # "show": true, # "values": [] # }, # "yaxes": [ # { # "format": "short", # "logBase": 1, # "min": "0", # "show": true # }, # { # "format": "short", # "logBase": 1, # "show": true # } # ], # "yaxis": { # "align": false # } # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "color": { # "mode": "thresholds" # }, # "custom": { # "align": "center", # "displayMode": "auto", # "filterable": false, # "inspect": false # }, # "links": [], # "mappings": [], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "green", # "value": null # } # ] # } # }, # "overrides": [ # { # "matcher": { # "id": "byName", # "options": "ID" # }, # "properties": [ # { # "id": "links", # "value": [ # { # "targetBlank": true, # "title": "View pipeline #${__value.numeric}", # "url": "https://${GITLAB_HOST}/${__data.fields.project}/pipelines/${__value.numeric}" # } # ] # }, # { # "id": "custom.displayMode", # "value": "color-background" # }, # { # "id": "color", # "value": { # "fixedColor": "dark-blue", # "mode": "fixed" # } # }, # { # "id": "custom.width", # "value": 85 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Status" # }, # "properties": [ # { # "id": "custom.displayMode", # "value": "color-background" # }, # { # "id": "mappings", # "value": [ # { # "options": { # "1": { # "text": "SUCCESS" # } # }, # "type": "value" # } # ] # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Job" # }, # "properties": [ # { # "id": "custom.align", # "value": "left" # }, # { # "id": "custom.width", # "value": 230 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Project" # }, # "properties": [ # { # "id": "custom.align", # "value": "left" # }, # { # "id": "custom.width", # "value": 218 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Ref Kind" # }, # "properties": [ # { # "id": "custom.width", # "value": 98 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Ref Name" # }, # "properties": [ # { # "id": "custom.width", # "value": 122 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Duration" # }, # "properties": [ # { # "id": "unit", # "value": "dtdurations" # }, # { # "id": "thresholds", # "value": { # "mode": "absolute", # "steps": [ # { # "color": "green", # "value": null # }, # { # "color": "light-orange", # "value": 900 # }, # { # "color": "semi-dark-red", # "value": 1200 # } # ] # } # }, # { # "id": "custom.displayMode", # "value": "color-background" # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Date" # }, # "properties": [ # { # "id": "unit", # "value": "dtdurations" # }, # { # "id": "custom.displayMode", # "value": "color-background" # } # ] # } # ] # }, # "gridPos": { # "h": 26, # "w": 12, # "x": 12, # "y": 6 # }, # "id": 122, # "links": [], # "options": { # "footer": { # "fields": "", # "reducer": [ # "sum" # ], # "show": false # }, # "showHeader": true, # "sortBy": [ # { # "desc": true, # "displayName": "Date" # } # ] # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "-max(time() - gitlab_ci_pipeline_timestamp{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) unless max(gitlab_ci_pipeline_status{status!~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) > 0", # "format": "table", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "B" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "max(gitlab_ci_pipeline_duration_seconds{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) unless (max(gitlab_ci_pipeline_status{status!~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) > 0)", # "format": "table", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "C" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "max(gitlab_ci_pipeline_id{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) unless (max(gitlab_ci_pipeline_status{status!~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) > 0)", # "format": "table", # "instant": true, # "interval": "", # "legendFormat": "", # "refId": "D" # } # ], # "title": "SUCCESSFULLY COMPLETED", # "transformations": [ # { # "id": "merge", # "options": {} # }, # { # "id": "organize", # "options": { # "excludeByName": { # "Time": true, # "Value #A": false, # "job_name": false # }, # "indexByName": { # "Time": 0, # "Value #A": 9, # "Value #B": 6, # "Value #C": 7, # "Value #D": 1, # "job_name": 3, # "kind": 4, # "project": 2, # "ref": 5, # "status": 8 # }, # "renameByName": { # "Value #A": "Status", # "Value #B": "Date", # "Value #C": "Duration", # "Value #D": "ID", # "job_name": "Job", # "kind": "Ref Kind", # "project": "Project", # "ref": "Ref Name", # "status": "Status" # } # } # }, # { # "id": "calculateField", # "options": { # "alias": "Status", # "mode": "reduceRow", # "reduce": { # "include": [ # "ID" # ], # "reducer": "count" # } # } # } # ], # "type": "table" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "fieldConfig": { # "defaults": { # "color": { # "mode": "thresholds" # }, # "custom": { # "align": "center", # "displayMode": "auto", # "filterable": false, # "inspect": false # }, # "links": [], # "mappings": [], # "thresholds": { # "mode": "absolute", # "steps": [ # { # "color": "green", # "value": null # } # ] # } # }, # "overrides": [ # { # "matcher": { # "id": "byName", # "options": "ID" # }, # "properties": [ # { # "id": "links", # "value": [ # { # "targetBlank": true, # "title": "View pipeline #${__value.numeric}", # "url": "https://${GITLAB_HOST}/${__data.fields.project}/pipelines/${__value.numeric}" # } # ] # }, # { # "id": "custom.displayMode", # "value": "color-background" # }, # { # "id": "color", # "value": { # "fixedColor": "dark-blue", # "mode": "fixed" # } # }, # { # "id": "custom.width", # "value": 85 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Status" # }, # "properties": [ # { # "id": "custom.displayMode", # "value": "color-background" # }, # { # "id": "color", # "value": { # "mode": "thresholds" # } # }, # { # "id": "mappings", # "value": [ # { # "options": { # "2": { # "text": "RUNNING" # }, # "3": { # "text": "FAILED" # }, # "4": { # "text": "CANCELED" # }, # "5": { # "text": "CREATED" # }, # "6": { # "text": "WAITING FOR RESOURCE" # }, # "7": { # "text": "PREPARING" # }, # "8": { # "text": "PENDING" # }, # "9": { # "text": "SKIPPED" # }, # "10": { # "text": "MANUAL" # }, # "11": { # "text": "SCHEDULED" # } # }, # "type": "value" # } # ] # }, # { # "id": "thresholds", # "value": { # "mode": "absolute", # "steps": [ # { # "color": "green", # "value": null # }, # { # "color": "light-blue", # "value": 1 # }, # { # "color": "semi-dark-red", # "value": 3 # }, # { # "color": "light-orange", # "value": 5 # }, # { # "color": "rgb(135, 135, 134)", # "value": 9 # } # ] # } # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Job" # }, # "properties": [ # { # "id": "custom.align", # "value": "left" # }, # { # "id": "custom.width", # "value": 230 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Project" # }, # "properties": [ # { # "id": "custom.align", # "value": "left" # }, # { # "id": "custom.width", # "value": 218 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Ref Kind" # }, # "properties": [ # { # "id": "custom.width", # "value": 98 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Ref Name" # }, # "properties": [ # { # "id": "custom.width", # "value": 122 # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Duration" # }, # "properties": [ # { # "id": "unit", # "value": "dtdurations" # }, # { # "id": "thresholds", # "value": { # "mode": "absolute", # "steps": [ # { # "color": "green", # "value": null # }, # { # "color": "light-orange", # "value": 900 # }, # { # "color": "semi-dark-red", # "value": 1200 # } # ] # } # }, # { # "id": "custom.displayMode", # "value": "color-background" # } # ] # }, # { # "matcher": { # "id": "byName", # "options": "Date" # }, # "properties": [ # { # "id": "unit", # "value": "dtdurations" # }, # { # "id": "custom.displayMode", # "value": "color-background" # } # ] # } # ] # }, # "gridPos": { # "h": 22, # "w": 12, # "x": 0, # "y": 10 # }, # "id": 120, # "links": [], # "options": { # "footer": { # "fields": "", # "reducer": [ # "sum" # ], # "show": false # }, # "showHeader": true, # "sortBy": [ # { # "desc": true, # "displayName": "Date" # } # ] # }, # "pluginVersion": "9.1.6", # "targets": [ # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "-max(time() - gitlab_ci_pipeline_timestamp{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) unless max(gitlab_ci_pipeline_status{status=~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) > 0", # "format": "table", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "B" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "max(gitlab_ci_pipeline_duration_seconds{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) unless (max(gitlab_ci_pipeline_status{status=~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind) > 0)", # "format": "table", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "C" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"running\"}) by (project, ref, kind) * 2) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"failed\"}) by (project, ref, kind) * 3) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"canceled\"}) by (project, ref, kind) * 4) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"created\"}) by (project, ref, kind) * 5) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"waiting_for_resource\"}) by (project, ref, kind) * 6) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"preparing\"}) by (project, ref, kind) * 7) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"pending\"}) by (project, ref, kind) * 8) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"skipped\"}) by (project, ref, kind) * 9) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"manual\"}) by (project, ref, kind) * 10) > 0 or\n(max(gitlab_ci_pipeline_status{project=~\"$PROJECT\", ref=~\"$REF\", status=~\"scheduled\"}) by (project, ref, kind) * 11) > 0", # "format": "table", # "hide": false, # "instant": true, # "interval": "", # "intervalFactor": 1, # "legendFormat": "", # "refId": "A" # }, # { # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "expr": "max(gitlab_ci_pipeline_id{project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind, job_name) unless (max(gitlab_ci_pipeline_status{status=~\"success\", project=~\"$PROJECT\", ref=~\"$REF\"}) by (project, ref, kind, job_name) > 0)", # "format": "table", # "instant": true, # "interval": "", # "legendFormat": "", # "refId": "D" # } # ], # "title": "RUNNING, FAILED OR NOT COMPLETED", # "transformations": [ # { # "id": "merge", # "options": {} # }, # { # "id": "organize", # "options": { # "excludeByName": { # "Time": true, # "Value #A": false, # "job_name": false # }, # "indexByName": { # "Time": 0, # "Value #A": 9, # "Value #B": 6, # "Value #C": 7, # "Value #D": 1, # "job_name": 3, # "kind": 4, # "project": 2, # "ref": 5, # "status": 8 # }, # "renameByName": { # "Value #A": "Status", # "Value #B": "Date", # "Value #C": "Duration", # "Value #D": "ID", # "job_name": "Job", # "kind": "Ref Kind", # "project": "Project", # "ref": "Ref Name", # "status": "Status" # } # } # } # ], # "type": "table" # } # ], # "refresh": "10s", # "schemaVersion": 37, # "style": "dark", # "tags": [], # "templating": { # "list": [ # { # "hide": 2, # "name": "GITLAB_HOST", # "query": "gitlab.com", # "skipUrlSync": false, # "type": "constant" # }, # { # "allValue": ".*", # "current": { # "selected": false, # "text": "All", # "value": "$__all" # }, # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "definition": "label_values(gitlab_ci_pipeline_id, project)", # "hide": 0, # "includeAll": true, # "label": "owner", # "multi": true, # "name": "OWNER", # "options": [], # "query": { # "query": "label_values(gitlab_ci_pipeline_id, project)", # "refId": "Prometheus-OWNER-Variable-Query" # }, # "refresh": 2, # "regex": "/(.*)\\/.*$/", # "skipUrlSync": false, # "sort": 0, # "tagValuesQuery": "", # "tagsQuery": "", # "type": "query", # "useTags": false # }, # { # "allValue": ".*", # "current": { # "selected": false, # "text": "All", # "value": "$__all" # }, # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "definition": "label_values(gitlab_ci_pipeline_id{project=~\"$OWNER.*\"}, project)", # "hide": 0, # "includeAll": true, # "label": "project", # "multi": true, # "name": "PROJECT", # "options": [], # "query": { # "query": "label_values(gitlab_ci_pipeline_id{project=~\"$OWNER.*\"}, project)", # "refId": "Prometheus-PROJECT-Variable-Query" # }, # "refresh": 2, # "regex": "", # "skipUrlSync": false, # "sort": 1, # "tagValuesQuery": "", # "tagsQuery": "", # "type": "query", # "useTags": false # }, # { # "allValue": ".*", # "current": { # "selected": false, # "text": "All", # "value": "$__all" # }, # "datasource": { # "type": "prometheus", # "uid": "prometheus" # }, # "definition": "label_values(gitlab_ci_pipeline_id{project=~\"$PROJECT\"}, ref)", # "hide": 0, # "includeAll": true, # "label": "ref", # "multi": true, # "name": "REF", # "options": [], # "query": { # "query": "label_values(gitlab_ci_pipeline_id{project=~\"$PROJECT\"}, ref)", # "refId": "Prometheus-REF-Variable-Query" # }, # "refresh": 2, # "regex": "", # "skipUrlSync": false, # "sort": 1, # "tagValuesQuery": "", # "tagsQuery": "", # "type": "query", # "useTags": false # } # ] # }, # "time": { # "from": "now-1h", # "to": "now" # }, # "timepicker": { # "refresh_intervals": [ # "10s", # "30s", # "1m", # "5m", # "15m", # "30m", # "1h", # "2h", # "1d" # ], # "time_options": [ # "5m", # "15m", # "1h", # "6h", # "12h", # "24h", # "2d", # "7d", # "30d" # ] # }, # "timezone": "", # "title": "GitLab CI pipelines", # "uid": "gitlab_ci_pipelines", # "version": 1, # "weekStart": "" # }