apiVersion: v1
data:
  dashboard.json: |-
    {
        "annotations": {
          "list": []
        },
        "description": "Glitchtip Stage Dashboard",
        "editable": true,
        "fiscalYearStartMonth": 0,
        "graphTooltip": 0,
        "id": 344,
        "links": [],
        "liveNow": false,
        "panels": [
          {
            "gridPos": {
              "h": 1,
              "w": 24,
              "x": 0,
              "y": 0
            },
            "id": 2,
            "title": "Glitchtip",
            "type": "row"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "aQ7y3WBnk"
            },
            "description": "Glitchtip Service Availability",
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "palette-classic"
                },
                "custom": {
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "drawStyle": "line",
                  "fillOpacity": 0,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "auto",
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "mappings": [],
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              },
              "overrides": []
            },
            "gridPos": {
              "h": 10,
              "w": 24,
              "x": 0,
              "y": 1
            },
            "id": 4,
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom"
              },
              "tooltip": {
                "mode": "single",
                "sort": "none"
              }
            },
            "targets": [
              {
                "datasource": {
                  "type": "prometheus",
                  "uid": "aQ7y3WBnk"
                },
                "exemplar": true,
                "expr": "sum by (service) (rate(django_http_responses_total_by_status_total{status!~\"50.*\"}[5m])) / sum by (service) (rate(django_http_responses_total_by_status_total[5m])) * 100",
                "interval": "",
                "legendFormat": "{{service}}",
                "refId": "A"
              }
            ],
            "title": "Service Availability",
            "type": "timeseries"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "aQ7y3WBnk"
            },
            "description": "Glitchtip Latency",
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "palette-classic"
                },
                "custom": {
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "drawStyle": "line",
                  "fillOpacity": 0,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "auto",
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "mappings": [],
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              },
              "overrides": []
            },
            "gridPos": {
              "h": 8,
              "w": 12,
              "x": 0,
              "y": 11
            },
            "id": 6,
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom"
              },
              "tooltip": {
                "mode": "single",
                "sort": "none"
              }
            },
            "targets": [
              {
                "datasource": {
                  "type": "prometheus",
                  "uid": "aQ7y3WBnk"
                },
                "exemplar": true,
                "expr": "rate(django_http_requests_latency_including_middlewares_seconds_sum[5m])/rate(django_http_requests_latency_including_middlewares_seconds_count[5m])",
                "interval": "",
                "legendFormat": "{{pod}}",
                "refId": "A"
              }
            ],
            "title": "Latency (per request)",
            "type": "timeseries"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "aQ7y3WBnk"
            },
            "description": "Errors Rate",
            "fieldConfig": {
              "defaults": {
                "color": {
                  "mode": "palette-classic"
                },
                "custom": {
                  "axisLabel": "",
                  "axisPlacement": "auto",
                  "barAlignment": 0,
                  "drawStyle": "line",
                  "fillOpacity": 0,
                  "gradientMode": "none",
                  "hideFrom": {
                    "legend": false,
                    "tooltip": false,
                    "viz": false
                  },
                  "lineInterpolation": "linear",
                  "lineWidth": 1,
                  "pointSize": 5,
                  "scaleDistribution": {
                    "type": "linear"
                  },
                  "showPoints": "auto",
                  "spanNulls": false,
                  "stacking": {
                    "group": "A",
                    "mode": "none"
                  },
                  "thresholdsStyle": {
                    "mode": "off"
                  }
                },
                "mappings": [],
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              },
              "overrides": []
            },
            "gridPos": {
              "h": 8,
              "w": 12,
              "x": 12,
              "y": 11
            },
            "id": 8,
            "options": {
              "legend": {
                "calcs": [],
                "displayMode": "list",
                "placement": "bottom"
              },
              "tooltip": {
                "mode": "single",
                "sort": "none"
              }
            },
            "targets": [
              {
                "datasource": {
                  "type": "prometheus",
                  "uid": "aQ7y3WBnk"
                },
                "exemplar": true,
                "expr": "(sum by (service) (rate(django_http_responses_total_by_status_total{status!~\"20.*\"}[5m])))",
                "interval": "",
                "legendFormat": "{{service}}",
                "refId": "A"
              }
            ],
            "title": "Error Rate",
            "type": "timeseries"
          }
        ],
        "schemaVersion": 35,
        "style": "dark",
        "tags": [
          "glitchtip"
        ],
        "templating": {
          "list": []
        },
        "time": {
          "from": "now-6h",
          "to": "now"
        },
        "timepicker": {},
        "timezone": "",
        "title": "GT Stage",
        "uid": "gQp-L_w7z",
        "version": 4,
        "weekStart": ""
      }
kind: ConfigMap
metadata:
  name: grafana-dashboard-glitchtip
  labels:
    grafana_dashboard: "true"
  annotations:
    grafana-folder: /grafana-dashboard-definitions/glitchtip
