From 94e7344c8ea14541408ace7ba1790b1b99fe1ab1 Mon Sep 17 00:00:00 2001 From: Gabriel Cocenza Date: Thu, 17 Oct 2024 15:48:21 -0300 Subject: [PATCH] Add neutron ports alert rules When neutron is under heavy load, routers can fail and leave ports that are not binding. Alert in such condition can help operations Change-Id: I36bddc1db00143d8773d762b8033aef0c52bbafc --- .../prometheus_alert_rules/neutron_rules.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/charms/openstack-exporter-k8s/src/prometheus_alert_rules/neutron_rules.yaml b/charms/openstack-exporter-k8s/src/prometheus_alert_rules/neutron_rules.yaml index 9517cb4a..b6878da4 100644 --- a/charms/openstack-exporter-k8s/src/prometheus_alert_rules/neutron_rules.yaml +++ b/charms/openstack-exporter-k8s/src/prometheus_alert_rules/neutron_rules.yaml @@ -11,3 +11,27 @@ groups: description: | The Neutron service '{{ $labels.service }}' is currently down on host {{ $labels.hostname }}. LABELS = {{ $labels }} + + - alert: NeutronPortsCritical + # router_gateway are ports that connects the router to an external network. + expr: openstack_neutron_port{admin_state_up="true", binding_vif_type="binding_failed", device_owner="network:router_gateway"} > 0 + for: 5m + labels: + severity: critical + annotations: + summary: Neutron gateway ports binding failing. + description: | + Please check if neutron workers and/or server is overloaded + LABELS = {{ $labels }} + + - alert: NeutronPortsWarning + # Other ports are very likely to be workload related, like creating new VMs + expr: openstack_neutron_port{admin_state_up="true", binding_vif_type="binding_failed", device_owner!="network:router_gateway"} > 0 + for: 5m + labels: + severity: warning + annotations: + summary: Neutron ports binding failing. + description: | + Some ports are failing to bind + LABELS = {{ $labels }}