From bdb8c6ae35e0dfe72eee9fddc25bdc0d152b1261 Mon Sep 17 00:00:00 2001 From: Jonathan Herlin Date: Wed, 27 Mar 2024 15:44:57 +0100 Subject: [PATCH] Select additional labels in metric Without this we can't template network_name or subnet_name on the alert summary/description --- .../prometheus-openstack-exporter/templates/prometheusrule.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/prometheus-openstack-exporter/templates/prometheusrule.yaml b/charts/prometheus-openstack-exporter/templates/prometheusrule.yaml index 0b88676c5..692626ead 100644 --- a/charts/prometheus-openstack-exporter/templates/prometheusrule.yaml +++ b/charts/prometheus-openstack-exporter/templates/prometheusrule.yaml @@ -112,7 +112,7 @@ spec: - alert: NeutronNetworkOutOfIPs expr: | - sum by (network_id) (openstack_neutron_network_ip_availabilities_used{project_id!=""}) / sum by (network_id) (openstack_neutron_network_ip_availabilities_total{project_id!=""}) * 100 > 80 + sum by (network_id, network_name, subnet_name) (openstack_neutron_network_ip_availabilities_used{project_id!=""}) / sum by (network_id, network_name, subnet_name) (openstack_neutron_network_ip_availabilities_total{project_id!=""}) * 100 > 80 labels: severity: P4 annotations: