camptocamp / grafana-prometheus-alertmanager-datasource

Grafana Datasource for the Prometheus Alertmanager
Apache License 2.0
287 stars 57 forks source link

Show only most critical alerts on a panel #132

Open xafer337 opened 2 years ago

xafer337 commented 2 years ago

I have tried to create a panel that shows the number of alerts with the highest severity currently active. We have three levels of severity: Critical (red), warning (orange) and information (green).

image

I was wondering if there was a way to show in a panel only critical alerts in case there are any, ignoring alerts of lesser severity. At the same time, in case there are no critical alerts but warning alerts, show the warnings but no the information alerts.

Right now it shows all alerts at the same time.

image

In this example, there is a critical alert, so I would like to hide the warning and information queries, so that only a red box appears with the number of critical alerts:

image

I have not found any way to do something like this, so I would like to know if there is any possibility of something similar being implemented, or a workaround that I may have overlooked.

xafer337 commented 2 years ago

Hi! Has anyone thought of a solution? Thanks!