justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
402 stars 109 forks source link

Need to connect mysql database #123

Closed manzajohn closed 1 month ago

manzajohn commented 7 months ago

I need to connect to one of my mysql database running as kubernetes pod. Where can i find the configurations for mysql? i see only Postgres configurations in the repository. Any guidance on connecting mysql database will be appreciated

dewey commented 7 months ago

Any connection string that can be parsed by https://github.com/go-sql-driver/mysql would work.

manzajohn commented 7 months ago

So i assume, need to make below changes in config.yaml

connections:
  - 'mysql://user:password@tcp(db.query.consul)/db'
And in deployment.yaml should i change this to mysql specific? any reference for the same?

containers:

dewey commented 7 months ago

The configuration file is just an incomplete example on what's possible, you'll have to define what you want in there.