Skip to content

observability: add sample prometheus rule alert definitions#34

Merged
rjarry merged 1 commit intoopenstack-k8s-operators:mainfrom
abhiramnarayana:samplealerts
Feb 9, 2026
Merged

observability: add sample prometheus rule alert definitions#34
rjarry merged 1 commit intoopenstack-k8s-operators:mainfrom
abhiramnarayana:samplealerts

Conversation

@abhiramnarayana
Copy link
Contributor

Add PrometheusRule alert examples based on metrics exposed by openstack-network-exporter.

Include README with CRD headers to be used in deployments.

@abhiramnarayana abhiramnarayana force-pushed the samplealerts branch 2 times, most recently from 34debd4 to 6be46ff Compare February 4, 2026 10:08
description: |
PMD thread cpu {{ $labels.cpu }} (numa {{ $labels.numa }}) has more than 200
non-voluntary context switches in the last 5 minutes. High context switching
indicates the PMD is being preempted; this can cause packet loss and degraded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/loss/drop/

Packets are never "lost", they are dropped because the system cannot process them fast enough.

rules/README.md Outdated
@@ -0,0 +1,56 @@
# Prometheus rules for OVS metrics

This directory contains **spec-only** [PrometheusRule](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) fragments for metrics exposed by openstack-network-exporter (OVS/OVN). Prepend one of the headers below to get a full manifest you can apply.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap lines to 80 columns please

rules/README.md Outdated
Comment on lines 43 to 56
## Applying rules

1. Create a full manifest: paste one of the headers above, then the contents of the sample file (from `spec:` onward).
2. Apply in the namespace that your Prometheus's `ruleNamespaceSelector` watches (e.g. `openstack` for RHOSO):

```bash
oc apply -f your-complete-rule.yaml -n openstack
```

3. Verify (OpenStack/RHOSO):

```bash
oc get prometheusrules.monitoring.rhobs -n openstack
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I apply these rules if I don't have openstack?

Add PrometheusRule alert examples based on metrics exposed by
openstack-network-exporter.

Include README with CRD headers to be used in deployments.

Signed-off-by: Abhiram R N <abhiramrn@gmail.com>
@rjarry rjarry merged commit 51797db into openstack-k8s-operators:main Feb 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants