free / sql_exporter

Database agnostic SQL exporter for Prometheus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I configure multiple data sources

xhuan-wang opened this issue · comments

Hello, how can i configure multiple data sources in the same configuration file?
I've tried to configure in sql_exporter.yml:

target:
  data_source_name: 'mysql://username:password@tcp(locahost:3306)/test1'
  collectors: [mysql_test1]

target:
  data_source_name: 'mysql://username:password@tcp(localhsot:3306)/test2'
  collectors: [mysql_test2]

target:
  data_source_name: 'postgres://username:password@localhost:54320/test?sslmode=disable'
  collectors: [postgresg_test]

collector_files:
  - "*.collector.yml"

But it didn't work, so i want to know how to configure multiple data sources in a configuration file.
Looking forward to your reply. Thank you!

Hi @xhuan-wang ! As far as I know, it's not possible for the moment. The only available option for now is to have an instance of exporter per data source.

Hi @xhuan-wang ! As far as I know, it's not possible for the moment. The only available option for now is to have an instance of exporter per data source.
Thanks a lot !