Files
argocd-apps/apps/base/observability/vmpodscrape-cnpg.yaml
T
unkinben be6d07cf77 observability: scrape CloudNativePG postgres metrics (follow-up to #239) (#242)
Follow-up to #239. Every CNPG instance pod already exposes Prometheus metrics on `:9187` (`metrics` port), but nothing scraped them. Adds a single namespace-wide `VMPodScrape` (`namespaceSelector.any`, `selector cnpg.io/podRole=instance`) so the observability VMAgent collects postgres metrics for **all ~23 CNPG clusters** across the estate (authentik, grafana, woodpecker, artifactapi, puppet, litellm, …). No chart changes. Pairs well with the CNPG grafana.com dashboard (20417) as a further follow-up.

Reviewed-on: #242
Co-authored-by: Ben Vincent <ben@unkin.net>
Co-committed-by: Ben Vincent <ben@unkin.net>
2026-07-07 00:08:32 +10:00

18 lines
449 B
YAML

---
# 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