This image provides a robust postgres-exporter environment for Prometheus. It's designed for exporting a wide range of PostgreSQL metrics for monitoring, including performance, resource utilization, and operational health. The image is configured to be flexible, allowing for extensive customization of the metrics you collect.
Maintained by the Sourcemation, this postgres_exporter distribution is regularly updated to ensure it's current and secure. It is a lightweight and focused container, designed for easy integration into your existing Prometheus and PostgreSQL monitoring stack.
This image is intended for production environments where monitoring PostgreSQL is critical. It must be configured with the connection details for your PostgreSQL server.
Example for a local, non-production test:
# 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_URI="localhost:5432/postgres?sslmode=disable" \
-e DATA_SOURCE_USER=postgres \
-e DATA_SOURCE_PASS=password \
sourcemation/postgres-exporter
# Test it
curl "http://localhost:9187/metrics"
This container uses the following environment variables for configuration:
DATA_SOURCE_NAME: the default legacy format. Accepts URI form and key=value form arguments. The URI may contain the username and password to connect with.DATA_SOURCE_URI: an alternative to DATA_SOURCE_NAME which exclusively accepts the hostname without a username and password component. For example, my_pg_hostname or my_pg_hostname:5432/postgres?sslmode=disable.DATA_SOURCE_USER: When using DATA_SOURCE_URI, this environment variable is used to specify the username.DATA_SOURCE_PASS: When using DATA_SOURCE_URI, this environment variable is used to specify the password to connect with.DATA_SOURCE_PASS_FILE: The same as above but reads the password from a file.For a full list of environment variables and configuration options, please refer to the official documentation.
The standard postgres-exporter port, 9187, is exposed by default. Metrics are available at the /metrics endpoint.
Your contributions are valued! Feel free to suggest enhancements or request new images by opening an issue, or submit your own contributions via pull requests to the Sourcemation GitHub repository.
Disclaimer: The sourcemation/postgres-exporter image is not affiliated with
prometheus-community. The respective entities own the trademarks mentioned in
the offering. The sourcemation/postgres-exporter image is a separate project and
is maintained by Sourcemation.
A detailed risk analysis report of the image and its components can be found on the Sourcemation platform.
For more information, check out the overview of postgres_exporter page.
The base license for the solution (postgres_exporter) is the Apache License 2.0.
Content type
Image
Digest
sha256:5d8a0bb54…
Size
170.1 MB
Last updated
3 days ago
docker pull sourcemation/postgres-exporter