justwatchcom / sql_exporter

Flexible SQL Exporter for Prometheus.
MIT License
386 stars 106 forks source link

Need to connect mysql database #123

Open manzajohn opened 4 months ago

manzajohn commented 4 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 4 months ago

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

manzajohn commented 4 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 4 months ago

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