A Prometheus exporter that collects and exposes PostgreSQL server metrics for monitoring.
Postgres Exporter is a Prometheus exporter for PostgreSQL databases that collects performance and health metrics from PostgreSQL instances and exposes them in a Prometheus-compatible format. It enables comprehensive monitoring of PostgreSQL databases by gathering metrics from system views like pg_stat_*, covering databases, tables, indexes, replication, locks, and background writer activity. The project follows the Prometheus exporter pattern with a focus on reliability, configurability, and seamless integration into existing monitoring stacks.
DevOps engineers, SREs, and database administrators who need to monitor PostgreSQL instances within a Prometheus-based observability stack. It's particularly useful for teams managing multiple PostgreSQL servers, including SaaS or managed service environments.
Developers choose Postgres Exporter because it provides comprehensive, production-ready PostgreSQL metrics out of the box while offering flexible configuration options like customizable collectors and multi-target support. Its ability to run with non-superuser privileges (using the pg_monitor role) and support for custom SQL queries via YAML configuration make it both secure and extensible for diverse monitoring needs.
A PostgreSQL metric exporter for Prometheus
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Gathers extensive metrics from PostgreSQL's pg_stat_* system views, covering databases, tables, indexes, replication, and locks out of the box, as highlighted in the key features for detailed performance monitoring.
Allows enabling or disabling specific collectors via command-line flags and supports custom SQL queries through a YAML configuration file, enabling tailored monitoring setups without code changes.
Can run with a non-superuser database account using the pg_monitor role and supports file-based secrets for credentials, reducing security risks in production environments.
Offers a beta /probe endpoint for scraping multiple PostgreSQL servers from a single exporter instance, ideal for SaaS or managed service monitoring, though it's labeled as beta.
The multi-target functionality is explicitly marked as beta and may require changes in future releases, making it less stable for critical production deployments that rely on this feature.
Several options like auto-discover-databases and extend.query-path are deprecated, indicating potential breaking changes and reduced long-term support, which could disrupt existing setups.
For PostgreSQL versions older than 10, non-superuser monitoring requires manually creating custom functions and views, adding operational complexity and maintenance overhead.