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-mysql-exporter] Add support for multiple target #3750

Closed
Remy-Mollandin-SK5 opened this issue Sep 3, 2023 · 2 comments · Fixed by #3751
Closed

[prometheus-mysql-exporter] Add support for multiple target #3750

Remy-Mollandin-SK5 opened this issue Sep 3, 2023 · 2 comments · Fixed by #3751
Labels
enhancement New feature or request

Comments

@Remy-Mollandin-SK5
Copy link
Contributor

Remy-Mollandin-SK5 commented Sep 3, 2023

Is your feature request related to a problem ?

mysqld_exporter support multiple target since the release 0.15.0. https://github.com/prometheus/mysqld_exporter/releases/tag/v0.15.0

The implementation use a new route named /probe and credentials for each target are managed in the config file config.cnf. The current chart doesn't allow serviceMonitor path overide or adding params.

Describe the solution you'd like.

An implementation close to prometheus-redis-export would be ideal: https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-redis-exporter/values.yaml#L108

serviceMonitor:
  # When set true then use a ServiceMonitor to configure scraping
  enabled: false
  multipleTarget: false
  targets: []
  # for every targets, url and name must be set, port is optionnal
  # an individual additionalRelabeling can be set for every target
  # - endpoint: mysql1.dns.local
  #   name: mysql1
  #   port: 3307
  # - endpoint: mysql2.dns.local
  #   name: mysql2

The name could be used as key to retrieve the database credentials in config.cnf

[client.mysql1]
user=mysql1_user
password=mysql1_password
[client.mysql2]
user=mysql2_user
password=mysql2_password

Describe alternatives you've considered.

NONE

Additional context.

No response

@Remy-Mollandin-SK5 Remy-Mollandin-SK5 added the enhancement New feature or request label Sep 3, 2023
@Remy-Mollandin-SK5
Copy link
Contributor Author

#3751 drafted for implementation.

@Remy-Mollandin-SK5
Copy link
Contributor Author

#3751 should be ready for review.

It's working fine on a project with 5+ databases per environment.

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

Successfully merging a pull request may close this issue.

1 participant