prometheus-community / prometheus-community/postgres_exporter
cannot connect to azure managed PG
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Description
on azure managed postgres, postgres user format is postgres@mydatabase.azure.com and this doesn't play well with the DATASOURCE_NAME :
ERRO[0007] Error opening connection to database (postgresql://postgres%!m(MISSING)ydatabase.azure.com:PASSWORD_REMOVED@XXXXXXdatabase.azure.com:5432): pq: Invalid connection parameters specified. Check connection parameters, and try again. source="postgres_exporter.go:1474"
how can this be escaped / workedaround?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect postgres_exporter.go around line 1474 and the DATASOURCE_NAME connection path, using the Azure managed PostgreSQL username example in the report as the reproduction case. Done means identifying a supported escaping or workaround and confirming the exporter can open that connection without the malformed DSN error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100