observability: scrape CloudNativePG postgres metrics (follow-up to #239) #242

Merged
benvin merged 1 commits from benvin/cnpg-metrics into main 2026-07-07 00:08:33 +10:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit 7956a44b87 - Show all commits
@@ -8,3 +8,4 @@ resources:
- vmagent.yaml
- gateway.yaml
- httproute.yaml
- vmpodscrape-cnpg.yaml
@@ -0,0 +1,17 @@
---
# Scrape metrics (:9187) from every CloudNativePG postgres instance pod in any
# namespace. Picked up by the observability VMAgent (selectAllByDefault).
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: cnpg-clusters
namespace: observability
spec:
namespaceSelector:
any: true
selector:
matchLabels:
cnpg.io/podRole: instance
podMetricsEndpoints:
- port: metrics
path: /metrics