我无法将postgres_exporter连接到postgresql数据库。我得到了
time="2019-04-29T15:37:46Z" level=info msg="Established new database connection to \"localhost:5432\"." source="postgres_exporter.go:767"
time="2019-04-29T15:37:46Z" level=error msg="Error opening connection to database (postgresql://postgres:PASSWORD_REMOVED@localhost:5432/postgres?sslmode=disable): pq: unknown authentication response: 10" source="postgres_exporter.go:1260"
time="2019-04-29T15:37:46Z" level=info msg="Starting Server: :9187" source="postgres_exporter.go:1360"
端口和密码都正确。当我尝试运行它时,出现了以下错误:
# Start an example database
docker run --net=host -it --rm -e POSTGRES_PASSWORD=password postgres
# Connect to it
docker run --net=host -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/postgres?sslmode=disable" wrouesnel/postgres_exporter
它可以完美运行,但已经有正在运行的postgresql实例,因此我无法创建新实例。
本地 all all md5 主机 all all 127.0.0.1/32 md5
- mikeProgrammer