Can I use the same alert rule for multiple namespaces?

We have multiple Kubernetes namespaces that export Prometheus metrics to Grafana. We set up dashboards with variables that help us select which specific namespace we want to see ({namespace="$namespace"}).

I would like to know if it’s possible to create a single alert rule that evaluates each namespace individually and also provides information about which one triggered the alert. If not, what would be the recommended approach to streamline the process of creating the same alert rule for all namespaces?

Any help is welcomed and thanks in advance.

Hi! It sounds like you want to use multi-dimensional alerting in Grafana which will automatically create separate alerts for ecah namespace, provided metrics from each namespace are available in Prometheus (or whichever datasource you are using).