Skip to content

Commit b569555

Browse files
committed
feat(postgres): rename metrics from cnpg_pg_ to pg_
ref: #18
1 parent 434e07f commit b569555

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

manifests/postgres/components/metrics/kustomization.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ patches:
2222
- sourceLabels: ["__meta_kubernetes_pod_name"]
2323
targetLabel: instance
2424
action: replace
25+
26+
- op: add
27+
path: /spec/monitoring/podMonitorMetricRelabelings
28+
value:
29+
- sourceLabels: [__name__]
30+
regex: cnpg_pg_(.+)
31+
targetLabel: __name__
32+
replacement: pg_${1}
33+
action: replace
2534
# yamllint enable rule:indentation
2635
target:
2736
group: postgresql.cnpg.io

0 commit comments

Comments
 (0)