Grafana dashboard: Usage Insights - 4 - Alertmanager

# Grafana Cloud Alertmanager

This dashboard gives Grafana Cloud customers additional insight into their Grafana Cloud alertmanager instance. It highlights logs for troubleshooting notification failures, for example due to misconfiguration of email or webhook settings.

{
  "__inputs": [
    {
      "description": "",
      "label": "prometheus",
      "name": "DS_PROMETHEUS",
      "pluginId": "prometheus",
      "pluginName": "Prometheus",
      "type": "datasource"
    },
    {
      "description": "",
      "label": "loki-datasource",
      "name": "DS_LOKI",
      "pluginId": "loki",
      "pluginName": "Loki",
      "type": "datasource"
    }
  ],
  "__requires": [
    {
      "id": "grafana",
      "name": "Grafana",
      "type": "grafana",
      "version": "7.3.6"
    },
    {
      "id": "graph",
      "name": "Graph",
      "type": "panel",
      "version": ""
    },
    {
      "id": "prometheus",
      "name": "Prometheus",
      "type": "datasource",
      "version": "1.0.0"
    },
    {
      "id": "loki",
      "name": "Loki",
      "type": "datasource",
      "version": "1.0.0"
    },
    {
      "id": "stat",
      "name": "Stat",
      "type": "panel",
      "version": ""
    },
    {
      "id": "text",
      "name": "Text",
      "type": "panel",
      "version": "7.1.0"
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": false,
  "gnetId": 16593,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [],
  "panels": [
    {
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "title": "Alertmanager",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "links": [],
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        }
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 3,
      "links": [],
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7",
      "targets": [
        {
          "expr": "sum(grafanacloud_instance_alertmanager_alerts{id=~\"$alertmanager_id\", state=\"active\"})",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Active Alerts Configured",
      "transparent": false,
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "links": [],
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        }
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 1
      },
      "id": 4,
      "links": [],
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7",
      "targets": [
        {
          "expr": "sum(grafanacloud_instance_alertmanager_silences{id=~\"$alertmanager_id\", state=\"active\"})",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Active Silences",
      "transparent": false,
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOKI}",
      "description": "",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 5
      },
      "id": 5,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "sideWidth": null,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (level) (count_over_time({instance_type=\"alerts\", instance_id=~\"$alertmanager_id\"} | logfmt [$__interval]))",
          "legendFormat": "{{ level }}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Alertmanager Logs Volume",
      "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
        }
      ]
    },
    {
      "datasource": "${DS_LOKI}",
      "gridPos": {
        "h": 20,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 6,
      "options": {
        "showLabels": false,
        "showTime": false,
        "sortOrder": "Descending",
        "wrapLogMessage": true
      },
      "span": 12,
      "targets": [
        {
          "expr": "{instance_type=\"alerts\", instance_id=~\"$alertmanager_id\"} | logfmt | __error__ = \"\" | level=~\"(warn|error)\" | user=~\"$alertmanager_id\"",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Alertmanager Issues",
      "type": "logs"
    }
  ],
  "refresh": "",
  "rows": [],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [
    "alertmanager",
    "grafanacloud"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "Alertmanager Instance",
        "multi": false,
        "name": "alertmanager_id",
        "options": [],
        "query": "grafanacloud_instance_alertmanager_info{}",
        "refresh": 2,
        "regex": "/id=\"(?<value>[^\"]+)|name=\"(?<text>[^\"]+)/g",
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "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": "utc",
  "title": "Usage Insights - 4 - Alertmanager",
  "uid": "ntS5Ujs7z",
  "version": 0
}