OPEN DISTRO ALERTS HISTORY
A dashboard to view the history of all alerts sent by opendistro-alerting on the basis of Monitor, Trigger, and Severity.
For every alert sent by the [Opendistro alerting](https://opendistro.github.io/for-elasticsearch/features/alerting.html
) the document is saved in an [inbuilt index](https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/settings/#alerting-indices).

- `Datasource: ElasticSearch`
- `Index name: .opendistro-alerting-alert-history-*`
- `Pattern: No pattern`
- `Time field name: start_time`
- `Version: 7.0+`

[github/shubhamc183](https://github.com/shubhamc183/grafana-dashboards)

Email: [shubhamc183@gmail.com](mailto:shubhamc183@gmail.com)
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 12875,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1598014914022,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "decimals": null,
      "fill": 9,
      "fillGradient": 6,
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Alert Count",
          "bucketAggs": [
            {
              "field": "start_time",
              "id": "2",
              "settings": {
                "interval": "$interval",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "monitor_name.keyword:$monitor_name AND trigger_name.keyword:$trigger_name AND severity:$severity",
          "refId": "A",
          "timeField": "start_time"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Total Alerts count of $monitor_name",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "decimals": null,
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "hiddenSeries": false,
      "id": 7,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "{{term monitor_name.keyword}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "monitor_name.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "field": "start_time",
              "id": "2",
              "settings": {
                "interval": "$interval",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "monitor_name.keyword:$monitor_name AND trigger_name.keyword:$trigger_name AND severity:$severity",
          "refId": "A",
          "timeField": "start_time"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Alerts count per Monitor: $monitor_name",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "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": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "decimals": null,
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "{{term severity}} - {{term trigger_name.keyword}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "severity",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "trigger_name.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "field": "start_time",
              "id": "2",
              "settings": {
                "interval": "$interval",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "monitor_name.keyword:$monitor_name AND trigger_name.keyword:$trigger_name AND severity:$severity",
          "refId": "A",
          "timeField": "start_time"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Alerts count per Trigger: $trigger_name",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "short",
          "label": "",
          "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": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "$datasource",
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 27
      },
      "id": 3,
      "interval": null,
      "legend": {
        "percentage": false,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 1,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "{{term monitor_name.keyword}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "monitor_name.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "field": "start_time",
              "id": "2",
              "settings": {
                "interval": "$interval",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "monitor_name.keyword:$monitor_name AND trigger_name.keyword:$trigger_name AND severity:$severity",
          "refId": "A",
          "timeField": "start_time"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Monitor Count of $monitor_name",
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "$datasource",
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 27
      },
      "id": 5,
      "interval": null,
      "legend": {
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 1,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "{{term severity}} - {{term trigger_name.keyword}}",
          "bucketAggs": [
            {
              "fake": true,
              "field": "severity",
              "id": "4",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "fake": true,
              "field": "trigger_name.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "0"
              },
              "type": "terms"
            },
            {
              "field": "start_time",
              "id": "2",
              "settings": {
                "interval": "$interval",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "monitor_name.keyword:$monitor_name AND trigger_name.keyword:$trigger_name AND severity:$severity",
          "refId": "A",
          "timeField": "start_time"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Trigger Count of $trigger_name",
      "type": "grafana-piechart-panel",
      "valueName": "total"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 22,
  "style": "dark",
  "tags": [
    "elasticsearch",
    "open-distro",
    "alerts",
    "shubhamc183"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "PROD-OpenDistro-Alert-History",
          "value": "PROD-OpenDistro-Alert-History"
        },
        "hide": 0,
        "includeAll": false,
        "label": "ElasticSearch",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "elasticsearch",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": "*",
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "$datasource",
        "definition": "{\"find\": \"terms\", \"field\": \"monitor_name.keyword\"}",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Monitor",
        "multi": true,
        "name": "monitor_name",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"monitor_name.keyword\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "*",
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "datasource": "$datasource",
        "definition": "{\"find\": \"terms\", \"field\": \"trigger_name.keyword\", \"query\":\"monitor_name.keyword:$monitor_name\"}",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Trigger",
        "multi": true,
        "name": "trigger_name",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"trigger_name.keyword\", \"query\":\"monitor_name.keyword:$monitor_name\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "*",
        "current": {
          "selected": false,
          "text": "All",
          "value": "$__all"
        },
        "datasource": "$datasource",
        "definition": "{\"find\": \"terms\", \"field\": \"severity\", \"query\":\"monitor_name:$monitor_name AND trigger_name.keyword: $trigger_name\"}",
        "hide": 0,
        "includeAll": true,
        "index": -1,
        "label": "Severity",
        "multi": true,
        "name": "severity",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"severity\", \"query\":\"monitor_name:$monitor_name AND trigger_name.keyword: $trigger_name\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "auto": false,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "selected": false,
          "text": "30m",
          "value": "30m"
        },
        "hide": 0,
        "label": "Interval",
        "name": "interval",
        "options": [
          {
            "selected": false,
            "text": "1s",
            "value": "1s"
          },
          {
            "selected": false,
            "text": "5s",
            "value": "5s"
          },
          {
            "selected": false,
            "text": "10s",
            "value": "10s"
          },
          {
            "selected": false,
            "text": "30s",
            "value": "30s"
          },
          {
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": true,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "3h",
            "value": "3h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "selected": false,
            "text": "3d",
            "value": "3d"
          },
          {
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "selected": false,
            "text": "30d",
            "value": "30d"
          }
        ],
        "query": "1s,5s,10s,30s,1m,10m,30m,1h,3h,6h,12h,1d,3d,7d,14d,30d",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "OPEN DISTRO ALERTS HISTORY",
  "uid": "EeA_lhSGz",
  "variables": {
    "list": []
  },
  "version": 1,
  "description": "A dashboard to view the history of all alerts sent by opendistro-alerting on the basis of Monitor, Trigger, and Severity."
}