You can aggregate your alerts and then display them as a widget on a custom dashboard using a gauge-type metric (cx_alerts). When alert-to-metric is enabled, all alerts start to be accumulated into bucket. The number of triggered/resolved alerts is calculated per minute, creating a time series per every permutation.
Enabling alert aggregation
Alert aggregation is enabled per team. Keep in mind that alert metric is counted against your account's quota.
STEP 1. Go to Settings > Preferences and scroll down to the Alerts section.
STEP 2. Toggle the switch On to enable alert aggregation.
Metric widget
Add a widget to your custom dashboard to visualize alert aggregation.
STEP 1. Create a new custom dashboard or open an existing one.
STEP 2. Add a new widget to your dashboard.
STEP 3. On the right-hand sidebar, use the Source drop-down box to select Metrics as your data source.
STEP 4. Specify the cx_alerts metric or desired PromQL in the Query field. Use the following labels in conjunction with the metric:
alert_def_id
alert_def_name
alert_status
cx_source (always contains the alerts string as its value)
is_phantom
alert_def_type
alert_priority
alert_def_label_* (key value spread)
alert_def_group_by_* (key value spread)