From d493438d39e34f547bb49d6bb3502b615665f3be Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 12 Dec 2024 12:19:56 +0000 Subject: [PATCH 1/3] Alert rule for active routers on ML2/OVS Can detect issues with HA routers on an ML2/OVS deployment. --- etc/kayobe/kolla/config/prometheus/openstack.rules | 11 ++++++++++- ...dds-alert-for-active-routers-91281912213692c9.yaml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml diff --git a/etc/kayobe/kolla/config/prometheus/openstack.rules b/etc/kayobe/kolla/config/prometheus/openstack.rules index 78a7f82820..940c1bc11e 100644 --- a/etc/kayobe/kolla/config/prometheus/openstack.rules +++ b/etc/kayobe/kolla/config/prometheus/openstack.rules @@ -11,5 +11,14 @@ groups: annotations: summary: "{{ $labels.service }} at {{ $labels.hostname }} is down" description: "OpenStack service {{ $labels.service }} at {{ $labels.hostname }} is down" - +- name: Routers + rules: + - alert: OpenStackRouterDown + expr: count by (router_id) (openstack_neutron_l3_agent_of_router{ha_state="active"}) != 1 + for: 1m + labels: + severity: alert + annotations: + summary: "The router {{ $labels.router_id }} is not active on eactly one agent" + description: "The router {{ $labels.router_id }} should be active on exactly one agent. It can either active on multiple agents or not active at all." {% endraw %} diff --git a/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml b/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml new file mode 100644 index 0000000000..d66741aaa3 --- /dev/null +++ b/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds an alert to check that there is at least one active router on ML2/OVS based + deployments. From 9b3c0ddbe6b541f7326111f13d7ff3b3ddd8072c Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 12 Dec 2024 12:28:37 +0000 Subject: [PATCH 2/3] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MichaƂ Nasiadka --- etc/kayobe/kolla/config/prometheus/openstack.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/kayobe/kolla/config/prometheus/openstack.rules b/etc/kayobe/kolla/config/prometheus/openstack.rules index 940c1bc11e..ba78e76a30 100644 --- a/etc/kayobe/kolla/config/prometheus/openstack.rules +++ b/etc/kayobe/kolla/config/prometheus/openstack.rules @@ -19,6 +19,6 @@ groups: labels: severity: alert annotations: - summary: "The router {{ $labels.router_id }} is not active on eactly one agent" - description: "The router {{ $labels.router_id }} should be active on exactly one agent. It can either active on multiple agents or not active at all." + summary: "The router {{ $labels.router_id }} is not active on exactly one agent" + description: "The router {{ $labels.router_id }} should be active on exactly one agent. It can either be active on multiple agents or not active at all." {% endraw %} From 1466ea6ec4510c0b09688822d486b08767d03717 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 12 Dec 2024 15:46:26 +0000 Subject: [PATCH 3/3] Update releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml Co-authored-by: Matt Crees --- .../notes/adds-alert-for-active-routers-91281912213692c9.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml b/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml index d66741aaa3..1578a4706c 100644 --- a/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml +++ b/releasenotes/notes/adds-alert-for-active-routers-91281912213692c9.yaml @@ -1,5 +1,5 @@ --- features: - | - Adds an alert to check that there is at least one active router on ML2/OVS based + Adds an alert to check that there is exactly one active router on ML2/OVS based deployments.