Alertmanager: Expose Alert severity metric

Created on 13 Jun 2018  路  14Comments  路  Source: prometheus/alertmanager

When building dashboards it would be useful if I could filter the severity from alert manager metrics.

Critical = 10
Warning = 5

Currently I do this using Prometheus datasource but unfortunately does not know what alerts are silenced therefore my dashboards are reporting inaccurate statistics.

If the alert severity was exposed in the alert manager metrics then I can configure grafana to look at the pdometheus alert manager datasource as opposed to Prometheus.

This feels like a bit of a gap / disconnect between Prometheus and alert manager.

Thanks.

Pete

All 14 comments

Thanks for opening this issue! A problem I'm seeing about this is that the severity label, or in fact any label is just a convention, so it's difficult to expose metrics like this. I see the use for this though.

Maybe someone has an idea how to do this in a generic or completely different way to achieve the same result. Maybe @brian-brazil has a trick up his sleeve?

This sort of thing doesn't belong on /metrics, as it's not about AM performance.

Even given that, doing it generically would be hard. It sounds in this case like the right solution is someone to write an AM data source for Grafana.

I recall @davkal was thinking of an Alertmanager datasource in Grafana, that seems like a reasonable/correct solution to me.

@roidelapluie neat, thanks! I had not known about this plugin.

Yes and you have the annotations too

Yes there is a data source for Alert Manager and I have tried using that but was not able to filter on severity :)

Well that just sounds like the plugin should be extended to support the full capability of the Alertmanager API :) (I have yet to try it out, so I don鈥檛 know what is and what鈥檚 not possible)

Looks like the plugin has recently been updated to bring back severity labels, but cannot see that I can pull back the number of silenced alerts - I have raised an issue with the plugin author.

But .. on the other hand we have ALERTS in prometheus. Which is not about prom performance. Why can't we expose ALERTS in here, with 2 metrics:

alerts_processed
alerts_unprocessed

ALERTS is not on Prometheus's /metrics. I'm not sure what you're proposing.

it that inserted directly in the prometheus DB? oh that is a surprise for me.

@VR6Pete it seems that using the AlertManager datasource for Grafana fulfills your requirements and there's no reason to expose alert counters on arbitrary labels.
If so can you close the issue?

Leave a comment

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaT1g3R picture MaT1g3R  路  5Comments

mattbostock picture mattbostock  路  4Comments

tomplus picture tomplus  路  3Comments

oryband picture oryband  路  3Comments

stuartnelson3 picture stuartnelson3  路  5Comments