How to create a custom table panel displaying the unified-alerting alerts

  • What Grafana version and what operating system are you using?
    Grafana 8.3.0

  • What are you trying to achieve?
    Trying to query prometheus to retrieve a list of current alerts within unified-alerting.

  • How are you trying to achieve it?
    When using alertmanager, the scrapes contain the metric, “ALERTS{}”. It contains a list of current active alerts. I would like to create a table panel with the current alerts from unified-alerting.

  • What happened?
    The metric, “ALERTS{}”, or equivalent isn’t available when scraping Grafana metrics with unified-alerts enabled.

  • What did you expect to happen?
    I expected that unified-alerts would contain all of the same metrics as AlertManager.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?
    No. I was using an existing promql statement used with an AlertManager datasource.