-
Notifications
You must be signed in to change notification settings - Fork 109
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
adding db auto discovery support to postgres #124
Conversation
add autodiscovery for dbs
remove debug
remove debug comments
Exactly what we need 👍🏼 |
@rezonick Do you have capacity to try this PR? I don't have availability to test it, but if it works for two people we can merge it. |
@dewey i can confirm that this PR is working... |
@dewey to elaborate more i took @noapinsler branch, build the dockerfile as is, and deploy it instead of the original sql exporter docker image with same config and values.
few logs example of top-tables logs that run with the second connection excluding the posgres db: its being working for few days now and works good! |
@noapinsler Would you have time to replace the print statements with logging statements like in the rest of the file? Once that's done I can merge and create a release. @orilani Thanks for taking the time to test it, sounds good! |
change printf to logger
Update job.go
@dewey , I changed the printf to logger as in the rest of the file. |
Thanks! |
A new release is out, the Docker image is still being pushed but will be available shortly. Thanks for the contribution! |
When using PostgreSQL, if the connection specifies exclude or include (only one can be specified), the exporter will create connections to the jobs based on the required databases. This parameter accepts a list of databases that can also be specified using regex, like so:
'postgres://postgres@localhost/exclude:postgres,test_db*?sslmode=disable'