Add alert rules when neutron agents are down

This alert rule triggers when a Neutron agent is down.
The exporter generates the metric openstack_neutron_agent_state, which checks the status
of neutron agents. Alerts will appear if any neutron agent is found to be down.

Change-Id: I56deeec3df8197eece0350bcc369e46956e5230f
This commit is contained in:
Xuhui Zhu 2024-07-10 17:17:00 -04:00 committed by Gabriel Cocenza
parent f9deb89be3
commit 48460fd3d3
No known key found for this signature in database
2 changed files with 17 additions and 0 deletions

View File

@ -47,6 +47,10 @@ This charm automatically adds Prometheus alert rules using the files at
`src/prometheus_alert_rules` when related with `grafana-agent`. `src/prometheus_alert_rules` when related with `grafana-agent`.
The following alerts are configured by default: The following alerts are configured by default:
- `NeutronStateCritical`: This alert rule triggers when a Neutron agent is enabled, but down.
The exporter generates the metric openstack_neutron_agent_state, which checks the status
of neutron agents. Alerts will appear if any neutron agent is found to be down.
- `OpenStackServicesDown`: This alert rule will trigger when an OpenStack service is down. The - `OpenStackServicesDown`: This alert rule will trigger when an OpenStack service is down. The
exporter generates metrics that identify if services are up. E.g.: openstack_loadbalancer_up, exporter generates metrics that identify if services are up. E.g.: openstack_loadbalancer_up,
openstack_designate_up. Individual alerts will appear if one of those services has problems. openstack_designate_up. Individual alerts will appear if one of those services has problems.

View File

@ -0,0 +1,13 @@
groups:
- name: Neutron
rules:
- alert: NeutronStateCritical
expr: openstack_neutron_agent_state{adminState="up"} == 0
for: 5m
labels:
severity: critical
annotations:
summary: Neutron service down. (Instance {{ $labels.hostname }})
description: |
The Neutron service '{{ $labels.service }}' is currently down on host {{ $labels.hostname }}.
LABELS = {{ $labels }}