prometheus-community / postgres_exporter

A PostgreSQL metric exporter for Prometheus
Apache License 2.0
2.82k stars 743 forks source link

Support other unix ports #1094

Open StyXman opened 1 week ago

StyXman commented 1 week ago

What did you do?

Run postgres on unix socket /var/run/postgresql/.s.PGSQL.5433. Run pg_exp with DATA_SOURCE_NAME='host=/var/run/postgresql/.s.PGSQL.5433 dbname=gis'

What did you see instead? Under which circumstances?

err="dial unix /var/run/postgresql/.s.PGSQL.5433/.s.PGSQL.5432: connect: not a directory"

Also tried removing the socket filename, just leavinbg the run directory, but pg_exp still only tries the 5432 socket and not 5433.

Environment

Debian stable.

postgres_exporter, version 0.11.1 (branch: debian/sid, revision: 0.11.1-3+b5)
  build user:       team+pkg-go@tracker.debian.org
  build date:       20230409-10:13:00
  go version:       go1.19.8
  platform:         linux/amd64