Installation
PG Exporter can be installed through Pigsty, YUM/APT repositories, GitHub release packages (RPM/DEB/Tarball), Docker images, or source. For a guided comparison with install, enable, and verification commands, start at Download PG Exporter; this page remains the complete artifact reference.
Pigsty
The easiest way to get started with pg_exporter is to use Pigsty,
which is a complete PostgreSQL distribution with built-in Observability best practices based on pg_exporter, Prometheus, and Grafana.
You don’t even need to know any details about pg_exporter; it just gives you all the metrics and dashboard panels.
Release
You can also download pg_exporter package (RPM/DEB/ Tarball) directly 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 |
You can install it directly with your OS package manager (rpm/dpkg), or just place 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.
Starting with v1.4.1, the official RPM package name and artifact prefix change from pg_exporter to pg-exporter, matching the DEB package and repository install commands. The new RPM also provides and obsoletes the legacy pg_exporter package name, allowing direct upgrades from earlier releases.
Full SHA256 checksums are available in checksums.txt on the release page; version-specific checksums are also archived in the release notes.
Repository
The pg_exporter package is also available in the pigsty-infra repo.
You can add the repo to your system and install it 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
We have prebuilt Docker images for amd64 and arm64 architectures on Docker Hub: pgsty/pg_exporter.
The current Docker image is built from scratch. If you connect to remote PostgreSQL with sslmode=verify-ca or verify-full, mount an explicit CA certificate (sslrootcert or a system CA bundle), otherwise TLS verification may fail.
Compatibility
The default configuration supports PostgreSQL 10-19+. For EOL PostgreSQL versions, use the bundled legacy/ config package for compatible monitoring.
| 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 works with PgBouncer 1.8+, since v1.8 is the first version with SHOW command support.
| PgBouncer Version | Support Status |
|---|---|
| 1.8.x ~ 1.25+ | ✅ Full Support |
| before 1.8.x | ⚠️ No Metrics |