Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-postgres-exporter] Implement multiple target with /probe … #5012

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

festeveira
Copy link
Contributor

…endpoint

What this PR does / why we need it

This PR allows the user to use the multiple target support implemented by the exporter. It allows defining several postgres database targets, using the same or different auth modules.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

…endpoint

Signed-off-by: festeveira <f.esteveira@hotmail.com>
Signed-off-by: Francisco Esteveira <56481538+festeveira@users.noreply.github.com>
Copy link
Member

@zeritti zeritti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @festeveira, for your PR. Please, see my comments below.

Comment on lines +64 to +67
targets: []
# - endpoint:
# name:
# port: default 5432
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add sample values in the comments, e.g.

Suggested change
targets: []
# - endpoint:
# name:
# port: default 5432
targets: []
# - endpoint: pg01.local
# name: pg01
# port: 5432

@@ -50,6 +50,22 @@ serviceMonitor:
# TLS configuration to use when scraping the metric endpoint by Prometheus.
# tlsConfig: {}

# Use multipleTarget mode
multipleTargets:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to rename multipleTargets to multipleTarget as the latter is already used in a few charts in the repository.

Suggested change
multipleTargets:
multipleTarget:

{{- end }}
params:
target:
- {{ .endpoint }}:{{ .port | default 5432 }}/postgres
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about the path /postgres?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants