prometheus-community / prometheus-community/postgres_exporter

cannot connect to azure managed PG

Open
#407 3 comments 7 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.