apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    grafana_dashboard: "1"
    heritage: cli
    prometheus: monitoring
  name: concourse-dashboard
  namespace: monitoring
data:
  concourse.json: |-
    {
        "__inputs": [
            {
                "name": "DS_PROMETHEUS",
                "label": "Prometheus",
                "description": "",
                "type": "datasource",
                "pluginId": "prometheus",
                "pluginName": "Prometheus"
            }
        ],
        "__requires": [
            {
                "type": "grafana",
                "id": "grafana",
                "name": "Grafana",
                "version": "5.1.3"
            },
            {
                "type": "panel",
                "id": "graph",
                "name": "Graph",
                "version": "5.0.0"
            },
            {
                "type": "panel",
                "id": "heatmap",
                "name": "Heatmap",
                "version": "5.0.0"
            },
            {
                "type": "datasource",
                "id": "prometheus",
                "name": "Prometheus",
                "version": "5.0.0"
            }
        ],
        "annotations": {
            "list": [
                {
                    "builtIn": 1,
                    "datasource": "-- Grafana --",
                    "enable": true,
                    "hide": true,
                    "iconColor": "rgba(0, 211, 255, 1)",
                    "name": "Annotations & Alerts",
                    "type": "dashboard"
                }
            ]
        },
        "editable": true,
        "gnetId": 7036,
        "graphTooltip": 0,
        "id": null,
        "iteration": 1531916898129,
        "links": [],
        "panels": [
            {
                "collapsed": false,
                "gridPos": {
                    "h": 1,
                    "w": 24,
                    "x": 0,
                    "y": 0
                },
                "id": 14,
                "panels": [],
                "title": "Workers",
                "type": "row"
            },
            {
                "aliasColors": {},
                "bars": false,
                "dashLength": 10,
                "dashes": false,
                "datasource": "Prometheus",
                "fill": 1,
                "gridPos": {
                    "h": 11,
                    "w": 24,
                    "x": 0,
                    "y": 1
                },
                "id": 16,
                "legend": {
                    "avg": false,
                    "current": false,
                    "max": false,
                    "min": false,
                    "show": true,
                    "total": false,
                    "values": false
                },
                "lines": true,
                "linewidth": 1,
                "links": [],
                "nullPointMode": "null",
                "percentage": false,
                "pointradius": 5,
                "points": false,
                "renderer": "flot",
                "seriesOverrides": [],
                "spaceLength": 10,
                "stack": true,
                "steppedLine": false,
                "targets": [
                    {
                        "expr": "sum(concourse_workers_containers) by (worker)",
                        "format": "time_series",
                        "interval": "",
                        "intervalFactor": 1,
                        "legendFormat": "{{worker}}",
                        "refId": "A"
                    }
                ],
                "thresholds": [],
                "timeFrom": null,
                "timeShift": null,
                "title": "Concourse Worker Containers Count",
                "tooltip": {
                    "shared": true,
                    "sort": 0,
                    "value_type": "individual"
                },
                "type": "graph",
                "xaxis": {
                    "buckets": null,
                    "mode": "time",
                    "name": null,
                    "show": true,
                    "values": []
                },
                "yaxes": [
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    },
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    }
                ],
                "yaxis": {
                    "align": false,
                    "alignLevel": null
                }
            },
            {
                "aliasColors": {},
                "bars": false,
                "dashLength": 10,
                "dashes": false,
                "datasource": "Prometheus",
                "fill": 1,
                "gridPos": {
                    "h": 11,
                    "w": 24,
                    "x": 0,
                    "y": 12
                },
                "id": 18,
                "legend": {
                    "avg": false,
                    "current": false,
                    "max": false,
                    "min": false,
                    "show": true,
                    "total": false,
                    "values": false
                },
                "lines": true,
                "linewidth": 1,
                "links": [],
                "nullPointMode": "null",
                "percentage": false,
                "pointradius": 5,
                "points": false,
                "renderer": "flot",
                "seriesOverrides": [],
                "spaceLength": 10,
                "stack": true,
                "steppedLine": false,
                "targets": [
                    {
                        "expr": "sum(concourse_workers_volumes) by (worker)",
                        "format": "time_series",
                        "interval": "",
                        "intervalFactor": 1,
                        "legendFormat": "{{worker}}",
                        "refId": "A"
                    }
                ],
                "thresholds": [],
                "timeFrom": null,
                "timeShift": null,
                "title": "Concourse Worker Volumes",
                "tooltip": {
                    "shared": true,
                    "sort": 0,
                    "value_type": "individual"
                },
                "type": "graph",
                "xaxis": {
                    "buckets": null,
                    "mode": "time",
                    "name": null,
                    "show": true,
                    "values": []
                },
                "yaxes": [
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    },
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    }
                ],
                "yaxis": {
                    "align": false,
                    "alignLevel": null
                }
            },
            {
                "collapsed": false,
                "gridPos": {
                    "h": 1,
                    "w": 24,
                    "x": 0,
                    "y": 23
                },
                "id": 10,
                "panels": [],
                "title": "Build Count",
                "type": "row"
            },
            {
                "aliasColors": {},
                "bars": false,
                "dashLength": 10,
                "dashes": false,
                "datasource": "Prometheus",
                "fill": 1,
                "gridPos": {
                    "h": 11,
                    "w": 24,
                    "x": 0,
                    "y": 24
                },
                "id": 12,
                "legend": {
                    "avg": false,
                    "current": false,
                    "max": false,
                    "min": false,
                    "show": true,
                    "total": false,
                    "values": false
                },
                "lines": true,
                "linewidth": 1,
                "links": [],
                "nullPointMode": "null",
                "percentage": false,
                "pointradius": 5,
                "points": false,
                "renderer": "flot",
                "seriesOverrides": [],
                "spaceLength": 10,
                "stack": true,
                "steppedLine": false,
                "targets": [
                    {
                        "expr": "sum(concourse_builds_duration_seconds_count{team=~\"$team\", pipeline=~\"$pipeline\"}) by (pipeline)",
                        "format": "time_series",
                        "interval": "",
                        "intervalFactor": 1,
                        "legendFormat": "{{pipeline}}",
                        "refId": "A"
                    }
                ],
                "thresholds": [],
                "timeFrom": null,
                "timeShift": null,
                "title": "Build Count",
                "tooltip": {
                    "shared": true,
                    "sort": 0,
                    "value_type": "individual"
                },
                "type": "graph",
                "xaxis": {
                    "buckets": null,
                    "mode": "time",
                    "name": null,
                    "show": true,
                    "values": []
                },
                "yaxes": [
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    },
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    }
                ],
                "yaxis": {
                    "align": false,
                    "alignLevel": null
                }
            },
            {
                "collapsed": false,
                "gridPos": {
                    "h": 1,
                    "w": 24,
                    "x": 0,
                    "y": 35
                },
                "id": 6,
                "panels": [],
                "title": "Build Duration",
                "type": "row"
            },
            {
                "cards": {
                    "cardPadding": null,
                    "cardRound": null
                },
                "color": {
                    "cardColor": "#b4ff00",
                    "colorScale": "sqrt",
                    "colorScheme": "interpolateOranges",
                    "exponent": 0.5,
                    "mode": "spectrum"
                },
                "dataFormat": "timeseries",
                "datasource": "Prometheus",
                "gridPos": {
                    "h": 12,
                    "w": 24,
                    "x": 0,
                    "y": 36
                },
                "heatmap": {},
                "highlightCards": true,
                "id": 2,
                "legend": {
                    "show": true
                },
                "links": [],
                "targets": [
                    {
                        "expr": "sum(irate(concourse_builds_duration_seconds_sum{team=~\"$team\", pipeline=~\"$pipeline\",service=\"concourse-web\"}[5m])) by (le)",
                        "format": "heatmap",
                        "hide": false,
                        "intervalFactor": 1,
                        "legendFormat": "",
                        "refId": "A"
                    }
                ],
                "title": "Concourse Builds Duration",
                "tooltip": {
                    "show": true,
                    "showHistogram": false
                },
                "type": "heatmap",
                "xAxis": {
                    "show": true
                },
                "xBucketNumber": null,
                "xBucketSize": null,
                "yAxis": {
                    "decimals": null,
                    "format": "s",
                    "logBase": 2,
                    "max": null,
                    "min": null,
                    "show": true,
                    "splitFactor": null
                },
                "yBucketBound": "auto",
                "yBucketNumber": null,
                "yBucketSize": null
            },
            {
                "aliasColors": {},
                "bars": false,
                "dashLength": 10,
                "dashes": false,
                "datasource": "Prometheus",
                "description": "",
                "fill": 1,
                "gridPos": {
                    "h": 10,
                    "w": 24,
                    "x": 0,
                    "y": 48
                },
                "id": 8,
                "legend": {
                    "avg": false,
                    "current": false,
                    "max": false,
                    "min": false,
                    "show": true,
                    "total": false,
                    "values": false
                },
                "lines": true,
                "linewidth": 1,
                "links": [],
                "nullPointMode": "null",
                "percentage": false,
                "pointradius": 5,
                "points": false,
                "renderer": "flot",
                "seriesOverrides": [],
                "spaceLength": 10,
                "stack": false,
                "steppedLine": false,
                "targets": [
                    {
                        "expr": "histogram_quantile(0.99, sum(rate(concourse_builds_duration_seconds_bucket{team=~\"$team\", pipeline=~\"$pipeline\", service=\"concourse-web\"}[10m])) by (le))",
                        "format": "time_series",
                        "hide": false,
                        "intervalFactor": 1,
                        "legendFormat": "99p",
                        "refId": "B"
                    },
                    {
                        "expr": "histogram_quantile(0.95, sum(rate(concourse_builds_duration_seconds_bucket{team=~\"$team\", pipeline=~\"$pipeline\", service=\"concourse-web\"}[10m])) by (le))",
                        "format": "time_series",
                        "intervalFactor": 1,
                        "legendFormat": "90p",
                        "refId": "C"
                    },
                    {
                        "expr": "histogram_quantile(0.50, sum(rate(concourse_builds_duration_seconds_bucket{team=~\"$team\", pipeline=~\"$pipeline\", service=\"concourse-web\"}[10m])) by (le))",
                        "format": "time_series",
                        "intervalFactor": 1,
                        "legendFormat": "50p",
                        "refId": "D"
                    }
                ],
                "thresholds": [],
                "timeFrom": null,
                "timeShift": null,
                "title": "Concourse All Builds Duration Quantiles",
                "tooltip": {
                    "shared": true,
                    "sort": 0,
                    "value_type": "individual"
                },
                "type": "graph",
                "xaxis": {
                    "buckets": null,
                    "mode": "time",
                    "name": null,
                    "show": true,
                    "values": []
                },
                "yaxes": [
                    {
                        "format": "s",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    },
                    {
                        "format": "short",
                        "label": null,
                        "logBase": 1,
                        "max": null,
                        "min": null,
                        "show": true
                    }
                ],
                "yaxis": {
                    "align": false,
                    "alignLevel": null
                }
            }
        ],
        "schemaVersion": 16,
        "style": "dark",
        "tags": [],
        "templating": {
            "list": [
                {
                    "allValue": ".+",
                    "current": {},
                    "datasource": "Prometheus",
                    "hide": 0,
                    "includeAll": true,
                    "label": null,
                    "multi": false,
                    "name": "team",
                    "options": [],
                    "query": "label_values(concourse_builds_duration_seconds_sum{service=\"concourse-web\"}, team)\t",
                    "refresh": 1,
                    "regex": "",
                    "sort": 0,
                    "tagValuesQuery": "",
                    "tags": [],
                    "tagsQuery": "",
                    "type": "query",
                    "useTags": false
                },
                {
                    "allValue": ".+",
                    "current": {},
                    "datasource": "Prometheus",
                    "hide": 0,
                    "includeAll": true,
                    "label": null,
                    "multi": false,
                    "name": "pipeline",
                    "options": [],
                    "query": "label_values(concourse_builds_duration_seconds_sum{service=\"concourse-web\", team=~\"$team\"}, pipeline)\t",
                    "refresh": 1,
                    "regex": "",
                    "sort": 0,
                    "tagValuesQuery": "",
                    "tags": [],
                    "tagsQuery": "",
                    "type": "query",
                    "useTags": false
                }
            ]
        },
        "time": {
            "from": "now-24h",
            "to": "now"
        },
        "timepicker": {
            "refresh_intervals": [
                "5s",
                "10s",
                "30s",
                "1m",
                "5m",
                "15m",
                "30m",
                "1h",
                "2h",
                "1d"
            ],
            "time_options": [
                "5m",
                "15m",
                "1h",
                "6h",
                "12h",
                "24h",
                "2d",
                "7d",
                "30d"
            ]
        },
        "timezone": "",
        "title": "Concourse",
        "uid": "7lYytQdmz",
        "version": 9
    }