Comments (6)
Haha, you're right. Thank you for your suggestion
from sql_exporter.
Hi @gangzi59185, I need more context to help you. Please share your DSN with redacted sensitive data. 👍
Also, please refer to the schema names here (we use dbUrl
dependency to handle DSN): https://github.com/xo/dburl
from sql_exporter.
![image](https://private-user-images.githubusercontent.com/58457006/271990652-f3eef72b-bc74-400b-b067-a23a65fa1bb1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MTMwMTksIm5iZiI6MTcyMTYxMjcxOSwicGF0aCI6Ii81ODQ1NzAwNi8yNzE5OTA2NTItZjNlZWY3MmItYmM3NC00MDBiLWIwNjctYTIzYTY1ZmExYmIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDAxNDUxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3NTYxNmU1MDZiYTk0Nzk2MjA4ZjVhMGVjN2IzZWUxNjY4NWE1YThhYWUzMTBmMWE0NDZlYjI3Zjk5YmJmNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3JSHndmZ2vtNwsHbudzo2aa8aqRg3B31bw7pIuk8jKs)
from sql_exporter.
Hey @gangzi59185, I guess the problem is that you're using special characters (@
) in your password, so the entire string contains 2 @
making DSN impossible to parse.
In the README.md we have the following part:
If your DSN contains special characters in any part of your connection string (including
passwords), you might need to apply URL encoding (percent-encoding) to them. For example,
p@$$w0rd#abc then becomes p%40%24%24w0rd%23abc.
So in your case the password Datago@2021
should become Datago%402021
. Please, give it a shot and let me know.
P.S. I was referring to the URL scheme name (postgres://
) and not the database schema. It looks correct to me. 👍
from sql_exporter.
data_source_name: 'postgres://datago:xxxx@xxx:8000/mdmc_db?sslmode=disable&search_path=datago_db'
Thank you for your reply. I have fixed the password issue, but my problem is not a password issue. It is about the specified scheme in PostgreSQL. I have resolved it and added the parameter search_ Path=datago_ DB to specify a certain scheme, successfully read scheme=datago_ Data of db
from sql_exporter.
Hey @gangzi59185, I apologize, the terms are confusing. 👍 I'm glad you've found the solution, though. 😅 May I ask why can't you specify schema in your query? This is a pretty common practice. If not provided, it falls back to public
, indeed. But otherwise it should generally work, so you don't need to specify it explicitly. Unless, there is a special situation, of course. 🙂
from sql_exporter.
Related Issues (20)
- Context Deadline Exceeded HOT 9
- Support for MSSQL named pipe (np:) and shared memory (lpc:) DSNs HOT 16
- `up` metric to show that database connection was successful HOT 5
- parameter to set log file location HOT 8
- Add custom metrics to expose MSSQL server hostname HOT 1
- can we have the Postgres collector yml file example
- Is it possible to distinguish between the sql exporter process status and the target database? HOT 3
- Scrape each job separately HOT 2
- [helm] Support getting data-source-name from an existing secret HOT 12
- Ignore no rows returned HOT 6
- Better handling of NULL return values in certain cases HOT 6
- Environment variable substitution for DSN's HOT 3
- Cache Mechanism for sql exporter HOT 2
- clickhouse `context deadline exceeded` HOT 1
- Helm chart improvement: additionalContainers HOT 5
- Can it support the collection of cloud databases HOT 1
- unable to use -web.listen.address flag HOT 4
- SIGHUP config reload HOT 4
- Clickhouse requests dosn't work after upgrade clickhouse driver to v2 HOT 6
- Scrape errors not clearing without restart HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql_exporter.