-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Collect from multiple databases #37
Comments
Hi @ambu50, Try to apply the following snippet at sql_exporter.yml with your own adjustments:
You need to replace
Let me know if it works for you. I made a quick test, but didn't look deeper. 🙂 |
Hi, Thanks for your reply. My question was actually about accessing two databases from the same DBMS host. My issue was that I included the database name in the DSN like this: mysql://tcp(host1:3306)/db1. The solution is to remove the database name from the DSN then include it in the mysql query like this "select count(*) from db1.table1" I am sure your solution will help some other users with multiple DMBSs. |
Hey @ambu50, oh I'm sorry, I misunderstood that you meant logical databases, not database instances. Yes, this is the way. 🙂👍 |
@burningalchemist, does the ability to perform a |
Hey @jdstone, the interaction with the DB really depends on a particular driver implementation and the database. What's your current issue? |
@burningalchemist, I'd like to be able to connect to multiple databases without having to setup multiple sql_exporter containers. |
Hi @burningalchemist, in addition to being stuck with my previous question (from 2 days ago), I'm also confused by your response to ambu50 in the quote above. I have the following config, which specifies the Kubernetes Pod running the sql_exporter application. Are you saying that the Prometheus job configuration can be used to set to directly target a database server? Basically, I'm confused why you would want to specify a host with the
Thank you. |
@burningalchemist, could you please answer my questions above? |
Hey @jdstone, this configuration snippet is not for Prometheus. In |
Hi,
Is there a way to collect from multiple databases? I am using mysql data source and would like to read from two different databases within the same server.
The text was updated successfully, but these errors were encountered: