Skip to content

Commit

Permalink
[prometheus-postgres-exporter] Use non default database in multi-targets
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas BRIEN <[email protected]>
  • Loading branch information
tbrien committed Dec 18, 2024
1 parent 5c16027 commit 556beac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus-postgres-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v0.16.0"
description: A Helm chart for prometheus postgres-exporter
name: prometheus-postgres-exporter
version: 6.7.1
version: 6.8.0
home: https://github.com/prometheus-community/postgres_exporter
sources:
- https://github.com/prometheus-community/postgres_exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ spec:
{{- end }}
params:
target:
{{- if .databaseName }}
- {{ .endpoint }}:{{ .port | default 5432 }}/{{ .databaseName | default "" }}
{{- else }}
- {{ .endpoint }}:{{ .port | default 5432 }}
{{- end }}
{{- if $.Values.serviceMonitor.multipleTarget.sharedAuthModule.enabled }}
auth_module:
- {{ $.Values.serviceMonitor.multipleTarget.sharedAuthModule.name }}
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-postgres-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ serviceMonitor:
# - endpoint: pg01.local
# name: pg01 (there needs to exist an authModule with key "client.pg01" if not using sharedAuthModule)
# port: default 5432
# databaseName: default '' (Set the database name to connect to)

prometheusRule:
enabled: false
Expand Down

0 comments on commit 556beac

Please sign in to comment.