Skip to content

Exporter does not reconnect to database if docker-daemon has restarted #1084

Open
@Nikolay-Ch

Description

@Nikolay-Ch

What did you do?
sudo systemctl restart docker

What did you expect to see?
In logs i see infinite messages: "Error opening connection to database...". And Prometheus say in their logs: "connection refused"

What did you see instead? Under which circumstances?
Exporter restarts connection to database and exports metrics. Or... metrics to Prometheus server continue to send.

Environment
Ubuntu 24.04

  • PostgreSQL version:
    17

  • Logs:

ts=2024-11-05T20:26:24.749Z caller=postgres_exporter.go:682 level=error err="Error opening connection to database (postgresql://prometheus:[email protected]:5432/postgres?sslmode=disable): pq: no pg_hba.conf entry for host \"aaa.bbb.ccc.ddd\", user \"user\", database \"postgres\", no encryption"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions