cortexproject / cortex

A horizontally scalable, highly available, multi-tenant, long term Prometheus.
https://cortexmetrics.io/
Apache License 2.0
5.48k stars 802 forks source link

Send Ruler namespace information to Alertmanager #6210

Open kyo-ke opened 2 months ago

kyo-ke commented 2 months ago

Is your feature request related to a problem? Please describe. We are using Ruler namespace to group alerting rules. Sometimes we want to silence alert only in specific namespace. Problem is Ruler do not send namespace to Alertmanager.

Describe the solution you'd like Add "namespace" label to alert rule on Ruler side. Create configuration option for this functionality. By this user can silence alert based on this label.

we are happy to create PR for this.

yeya24 commented 2 months ago

If you add namespace label to your rules it should accomplish the same thing. Since Cortex rules are managed by APIs, what the blocker to configure it yourself?

kyo-ke commented 2 months ago

Thank you for quick response @yeya24 Yes, that is what we are doing now. But, in my opinion, namespace is already in API path so adding namespace label to each alert rule is redundant. Think it is useful to send this label automatically.