{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": { "type": "grafana", "uid": "-- Grafana --" },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "uid": "changemaker-overview",
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
      "id": 100,
      "title": "Email System",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 50 },
              { "color": "red", "value": 100 }
            ]
          }
        }
      },
      "gridPos": { "h": 6, "w": 6, "x": 0, "y": 1 },
      "id": 1,
      "options": {
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "cm_email_queue_size",
          "legendFormat": "Queue Size",
          "refId": "A"
        }
      ],
      "title": "Email Queue Size",
      "type": "gauge"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "palette-classic" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 6, "x": 6, "y": 1 },
      "id": 2,
      "options": {
        "legend": { "calcs": ["mean"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_emails_sent_total[5m])",
          "legendFormat": "Sent/sec",
          "refId": "A"
        }
      ],
      "title": "Emails Sent Rate",
      "type": "timeseries"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "fixedColor": "red", "mode": "fixed" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 6, "x": 12, "y": 1 },
      "id": 3,
      "options": {
        "legend": { "calcs": ["mean"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "single", "sort": "none" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_emails_failed_total[5m])",
          "legendFormat": "Failed/sec",
          "refId": "A"
        }
      ],
      "title": "Emails Failed Rate",
      "type": "timeseries"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "fixedColor": "purple", "mode": "fixed" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "s"
        }
      },
      "gridPos": { "h": 6, "w": 6, "x": 18, "y": 1 },
      "id": 4,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "single", "sort": "none" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "histogram_quantile(0.95, rate(cm_email_send_duration_seconds_bucket[5m]))",
          "legendFormat": "p95 Send Duration",
          "refId": "A"
        }
      ],
      "title": "Email Send Duration (p95)",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 7 },
      "id": 101,
      "title": "Authentication",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "palette-classic" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "bars",
            "fillOpacity": 80,
            "gradientMode": "none",
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "normal" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        },
        "overrides": [
          {
            "matcher": { "id": "byName", "options": "Failures" },
            "properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
          },
          {
            "matcher": { "id": "byName", "options": "Successes" },
            "properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
          }
        ]
      },
      "gridPos": { "h": 6, "w": 12, "x": 0, "y": 8 },
      "id": 5,
      "options": {
        "legend": { "calcs": ["sum"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_login_attempts_total{result=\"success\"}[5m])",
          "legendFormat": "Successes",
          "refId": "A"
        },
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_login_attempts_total{result=\"failure\"}[5m])",
          "legendFormat": "Failures",
          "refId": "B"
        }
      ],
      "title": "Login Attempts Rate",
      "type": "timeseries"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "thresholds" },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "blue", "value": null }
            ]
          }
        }
      },
      "gridPos": { "h": 6, "w": 12, "x": 12, "y": 8 },
      "id": 6,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "cm_active_sessions",
          "legendFormat": "Active Sessions",
          "refId": "A"
        }
      ],
      "title": "Active Sessions",
      "type": "stat"
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
      "id": 102,
      "title": "Campaigns & Responses",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "palette-classic" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 12, "x": 0, "y": 15 },
      "id": 7,
      "options": {
        "legend": { "calcs": ["sum"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_campaign_emails_total[5m])",
          "legendFormat": "Campaign Emails/sec",
          "refId": "A"
        }
      ],
      "title": "Campaign Email Sends Rate",
      "type": "timeseries"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "palette-classic" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 12, "x": 12, "y": 15 },
      "id": 8,
      "options": {
        "legend": { "calcs": ["sum"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_response_submissions_total[5m])",
          "legendFormat": "Responses/sec",
          "refId": "A"
        }
      ],
      "title": "Response Submissions Rate",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 21 },
      "id": 103,
      "title": "Canvassing",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "thresholds" },
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null }
            ]
          }
        }
      },
      "gridPos": { "h": 6, "w": 6, "x": 0, "y": 22 },
      "id": 9,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "cm_active_canvass_sessions",
          "legendFormat": "Active Sessions",
          "refId": "A"
        }
      ],
      "title": "Active Canvass Sessions",
      "type": "stat"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "palette-classic" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "bars",
            "fillOpacity": 80,
            "gradientMode": "none",
            "lineWidth": 1,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "normal" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 10, "x": 6, "y": 22 },
      "id": 10,
      "options": {
        "legend": { "calcs": ["sum"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_canvass_visits_total[5m])",
          "legendFormat": "{{outcome}}",
          "refId": "A"
        }
      ],
      "title": "Canvass Visits by Outcome",
      "type": "timeseries"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "fixedColor": "super-light-blue", "mode": "fixed" },
          "custom": {
            "axisColorMode": "text",
            "axisPlacement": "auto",
            "drawStyle": "line",
            "fillOpacity": 15,
            "gradientMode": "opacity",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "showPoints": "never",
            "spanNulls": false,
            "stacking": { "group": "A", "mode": "none" },
            "thresholdsStyle": { "mode": "off" }
          },
          "unit": "ops"
        }
      },
      "gridPos": { "h": 6, "w": 8, "x": 16, "y": 22 },
      "id": 11,
      "options": {
        "legend": { "calcs": ["sum"], "displayMode": "list", "placement": "bottom", "showLegend": true },
        "tooltip": { "mode": "single", "sort": "none" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "rate(cm_shift_signups_total[5m])",
          "legendFormat": "Signups/sec",
          "refId": "A"
        }
      ],
      "title": "Shift Signups Rate",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 28 },
      "id": 104,
      "title": "External Services",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "thresholds" },
          "mappings": [
            {
              "options": {
                "0": { "color": "red", "index": 1, "text": "DOWN" },
                "1": { "color": "green", "index": 0, "text": "UP" }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "red", "value": null },
              { "color": "green", "value": 1 }
            ]
          }
        }
      },
      "gridPos": { "h": 5, "w": 24, "x": 0, "y": 29 },
      "id": 12,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" },
          "expr": "cm_external_service_up",
          "legendFormat": "{{service}}",
          "refId": "A"
        }
      ],
      "title": "External Service Health",
      "type": "stat"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 38,
  "tags": ["changemaker", "v2", "application"],
  "templating": { "list": [] },
  "time": { "from": "now-1h", "to": "now" },
  "timepicker": {},
  "timezone": "",
  "title": "Changemaker - Application Overview",
  "version": 1
}
