apiVersion: v1
kind: ConfigMap
metadata:
  name: kubernetes-apiserver-per-client-dashboard
  labels:
    grafana_dashboard: "1"
    app: monitoring-grafana
data:
  kubernetes-apiserver-per-client-dashboard.json: |-
    {
      "annotations": {
        "list": [
        {
          "builtIn": 1,
          "datasource": "-- Grafana --",
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "type": "dashboard"
        }
        ]
      },
      "editable": false,
      "gnetId": null,
      "graphTooltip": 0,
      "id": 36,
      "iteration": 1571809361852,
      "links": [],
      "panels": [
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "id": 8,
        "panels": [],
        "title": "Metrics per client",
        "type": "row"
      },
      {
        "aliasColors": {},
        "bars": false,
        "dashLength": 10,
        "dashes": false,
        "datasource": "Prometheus",
        "fill": 1,
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 1
        },
        "id": 4,
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "current": false,
          "max": true,
          "min": false,
          "rightSide": true,
          "show": true,
          "total": false,
          "values": true
        },
        "lines": true,
        "linewidth": 1,
        "links": [],
        "nullPointMode": "null",
        "paceLength": 10,
        "percentage": false,
        "pointradius": 2,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "stack": false,
        "steppedLine": false,
        "targets": [
        {
          "expr": "sum(rate(apiserver_request_count{job=\"apiserver\", client=\"$client\"}[5m])) BY (client)",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{"{{"}} client }}",
          "refId": "A"
        }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "Request rate by client",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
        {
          "format": "reqps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": 0,
          "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": 8,
          "w": 12,
          "x": 12,
          "y": 1
        },
        "id": 10,
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "current": false,
          "max": true,
          "min": false,
          "rightSide": true,
          "show": true,
          "total": false,
          "values": true
        },
        "lines": true,
        "linewidth": 1,
        "links": [],
        "nullPointMode": "null",
        "paceLength": 10,
        "percentage": false,
        "pointradius": 2,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "stack": false,
        "steppedLine": false,
        "targets": [
        {
          "expr": "sum(rate(apiserver_request_count{job=\"apiserver\", client=\"$client\"}[5m])) BY (code)",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{"{{"}} code }}",
          "refId": "A"
        }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "Request rate per by status code",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
        {
          "format": "reqps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": 0,
          "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": 8,
          "w": 12,
          "x": 0,
          "y": 9
        },
        "id": 16,
        "legend": {
          "alignAsTable": true,
          "avg": true,
          "current": false,
          "max": true,
          "min": false,
          "rightSide": true,
          "show": true,
          "total": false,
          "values": true
        },
        "lines": true,
        "linewidth": 1,
        "links": [],
        "nullPointMode": "null",
        "paceLength": 10,
        "percentage": false,
        "pointradius": 2,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "stack": false,
        "steppedLine": false,
        "targets": [
        {
          "expr": "sum(rate(apiserver_request_count{job=\"apiserver\", client=\"$client\"}[5m])) BY (verb)",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{"{{"}} verb }}",
          "refId": "A"
        }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "Request rate per verb",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
        {
          "format": "reqps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": 0,
          "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": 8,
          "w": 12,
          "x": 12,
          "y": 9
        },
        "id": 18,
        "legend": {
          "avg": false,
          "current": false,
          "max": false,
          "min": false,
          "show": true,
          "total": false,
          "values": false
        },
        "lines": true,
        "linewidth": 1,
        "links": [],
        "nullPointMode": "null",
        "paceLength": 10,
        "percentage": false,
        "pointradius": 2,
        "points": false,
        "renderer": "flot",
        "seriesOverrides": [],
        "stack": false,
        "steppedLine": false,
        "targets": [
        {
          "expr": "rate(apiserver_request_count{code=~\"^(?:5..)$\", client=\"$client\"}[5m]) ",
          "format": "time_series",
          "intervalFactor": 1,
          "refId": "A"
        }
        ],
        "thresholds": [],
        "timeFrom": null,
        "timeRegions": [],
        "timeShift": null,
        "title": "Error rate",
        "tooltip": {
          "shared": true,
          "sort": 0,
          "value_type": "individual"
        },
        "type": "graph",
        "xaxis": {
          "buckets": null,
          "mode": "time",
          "name": null,
          "show": true,
          "values": []
        },
        "yaxes": [
        {
          "format": "short",
          "label": "errors/s",
          "logBase": 1,
          "max": null,
          "min": 0,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
        ],
        "yaxis": {
          "align": false,
          "alignLevel": null
        }
      }
      ],
      "schemaVersion": 18,
      "style": "dark",
      "tags": [
        "kyma"
      ],
      "templating": {
        "list": [
        {
          "allValue": null,
          "current": {
            "text": "Browser",
            "value": "Browser"
          },
          "datasource": "Prometheus",
          "definition": "label_values(client)",
          "hide": 0,
          "includeAll": false,
          "label": "client",
          "multi": false,
          "name": "client",
          "options": [],
          "query": "label_values(client)",
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "tagValuesQuery": "",
          "tags": [],
          "tagsQuery": "",
          "type": "query",
          "useTags": false
        }
        ]
      },
      "time": {
        "from": "now-6h",
        "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": "Kyma / Kubernetes API Server Clients",
      "uid": "tKyXpwoWk",
      "version": 1
    }
