7956a44b87
Follow-up to #239. Every CNPG instance pod exposes metrics on :9187 but nothing scraped them. Add one namespace-wide VMPodScrape (namespaceSelector any, selector cnpg.io/podRole=instance) so the VMAgent collects postgres metrics for all ~23 CNPG clusters (authentik, grafana, woodpecker, etc.).
18 lines
449 B
YAML
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
|