Installation
Install pg_exporter with Pigsty, YUM/APT repositories, GitHub release packages (RPM/DEB/Tarball), or Docker images. You can also build it from source.
Pigsty
Use Pigsty for the simplest installation.
Pigsty is a complete PostgreSQL distribution with monitoring based on pg_exporter, Prometheus, and Grafana.
It configures the metrics and dashboard panels for you. You do not need to configure pg_exporter separately.
Release
Download a pg_exporter package (RPM/DEB/Tarball) from the Latest GitHub Release Page:
v1.4.1 Release Files:
| Type | File |
|---|---|
| DEB (amd64) | pg-exporter_1.4.1-1_amd64.deb |
| DEB (arm64) | pg-exporter_1.4.1-1_arm64.deb |
| DEB (ppc64le) | pg-exporter_1.4.1-1_ppc64le.deb |
| RPM (aarch64) | pg-exporter-1.4.1-1.aarch64.rpm |
| RPM (x86_64) | pg-exporter-1.4.1-1.x86_64.rpm |
| RPM (ppc64le) | pg-exporter-1.4.1-1.ppc64le.rpm |
| Tarball (Linux amd64) | pg_exporter-1.4.1.linux-amd64.tar.gz |
| Tarball (Linux arm64) | pg_exporter-1.4.1.linux-arm64.tar.gz |
| Tarball (Linux ppc64le) | pg_exporter-1.4.1.linux-ppc64le.tar.gz |
| Tarball (macOS amd64) | pg_exporter-1.4.1.darwin-amd64.tar.gz |
| Tarball (macOS arm64) | pg_exporter-1.4.1.darwin-arm64.tar.gz |
| Tarball (Windows amd64) | pg_exporter-1.4.1.windows-amd64.tar.gz |
Install the package with your OS package manager (rpm/dpkg), or put the binary in your $PATH.
Current tarballs also include pg_exporter.yml, package/pg_exporter.default, package/pg_exporter.service, and LICENSE for manual deployments.
From v1.4.1, the official RPM package name and artifact prefix are pg-exporter, instead of pg_exporter.
This name matches the DEB package and repository installation commands.
The new RPM provides and obsoletes the legacy pg_exporter package name. You can upgrade directly from earlier releases.
The release page contains full SHA256 checksums in checksums.txt.
The release notes also contain checksums for each version.
Repository
The pigsty-infra repository also contains the pg_exporter package.
Add the repository to your system. Then install the package with your OS package manager:
YUM
For EL distributions such as RHEL, Rocky Linux, CentOS, AlmaLinux, and Oracle Linux:
APT
For Debian, Ubuntu and compatible Linux Distributions:
Docker
Docker Hub provides prebuilt images for the amd64 and arm64 architectures: pgsty/pg_exporter.
The current Docker image is built from scratch.
To connect to remote PostgreSQL with sslmode=verify-ca or verify-full, mount a CA certificate explicitly.
Use sslrootcert or a system CA bundle. Without this certificate, TLS verification can fail.
Compatibility
The default configuration supports PostgreSQL 10-19+.
For PostgreSQL versions that have reached EOL, use the bundled legacy/ configuration package.
| PostgreSQL Version | Support Status |
|---|---|
| 10 ~ 19+ | ✅ Full Support (default config) |
| 9.1 ~ 9.6 | ⚠️ Use legacy/pg_exporter.yml |
| 9.0 and earlier | ❌ Unsupported |
Legacy config example:
pg_exporter supports pgBouncer 1.8+.
Version v1.8 is the first pgBouncer version with SHOW command support.
| pgBouncer Version | Support Status |
|---|---|
| 1.8.x ~ 1.25+ | ✅ Full Support |
| before 1.8.x | ⚠️ No Metrics |
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)