Skip to content

Download matrix

Install PG Exporter

Six delivery routes, one exporter. Every route runs the same binary and the same declarative collectors, so choose by who owns the lifecycle on that host — not by feature set.

v1.4.1 · Linux · macOS · Windows · amd64 / arm64 / ppc64le

New here? Export your first metrics in five minutes

Install matrix

Pick the route that matches the host

Commands, links, and digests all come from the release record, so they cannot drift from the artifacts they name. The Linux package is pg-exporter; the executable, the service, the configuration file, and the container repository keep the compatibility name pg_exporter.

The recommended route for long-lived Linux hosts: APT/YUM upgrades, a systemd unit, the merged collector configuration, and /etc/default/pg_exporter arrive as one managed unit.

APT · Debian / Ubuntu
sudo tee /etc/apt/sources.list.d/pigsty-infra.list > /dev/null <<'EOF'
deb [trusted=yes] https://repo.pigsty.io/apt/infra generic main
EOF

sudo apt update
sudo apt install -y pg-exporter
YUM · RHEL / Rocky / Alma
sudo tee /etc/yum.repos.d/pigsty-infra.repo > /dev/null <<'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
enabled=1
gpgcheck=0
module_hotfixes=1
EOF

sudo yum makecache
sudo yum install -y pg-exporter
Point it at a database and start it
# PG_EXPORTER_URL='postgres://[email protected]:5432/postgres?sslmode=disable'
sudoedit /etc/default/pg_exporter

sudo systemctl enable --now pg_exporter
curl -fsS http://127.0.0.1:9630/up

Pinned packages for an offline or promotion-gated pipeline. They install the same systemd unit and defaults as the repository packages.

RPM / DEB
DEB · amd64 / arm64 / ppc64le
ARCH=amd64
curl -fLO "https://github.com/pgsty/pg_exporter/releases/download/v1.4.1/pg-exporter_1.4.1-1_$ARCH.deb"
sudo apt install "./pg-exporter_1.4.1-1_$ARCH.deb"
RPM · x86_64 / aarch64 / ppc64le
ARCH=$(uname -m)
curl -fLO "https://github.com/pgsty/pg_exporter/releases/download/v1.4.1/pg-exporter-1.4.1-1.$ARCH.rpm"
sudo dnf install "./pg-exporter-1.4.1-1.$ARCH.rpm"

Installer-free binaries for CI, macOS, Windows, and hosts where you own the service definition. Linux covers amd64, arm64, and ppc64le; macOS covers amd64 and arm64; Windows ships amd64.

Extract and install
OS=linux ARCH=amd64
ARCHIVE="pg_exporter-1.4.1.$OS-$ARCH.tar.gz"

curl -fLO "https://github.com/pgsty/pg_exporter/releases/download/v1.4.1/$ARCHIVE"
mkdir -p stage && tar -xzf "$ARCHIVE" -C stage
sudo install -m 0755 stage/pg_exporter /usr/local/bin/pg_exporter
sudo install -m 0644 stage/pg_exporter.yml /etc/pg_exporter.yml

pg_exporter --version
Verify before you promote it
curl -fLO "https://github.com/pgsty/pg_exporter/releases/download/v1.4.1/checksums.txt"
sha256sum -c checksums.txt --ignore-missing

A multi-architecture amd64/arm64 image. It is a scratch image: it carries the static binary, the merged config, and the license, but no shell and no operating-system CA bundle, so mount a CA explicitly for verify-full.

Container
Run a pinned image
docker run -d \
  --name pg_exporter \
  --restart unless-stopped \
  -p 127.0.0.1:9630:9630 \
  -e PG_EXPORTER_URL='postgres://monitor:S3cret@postgres:5432/postgres' \
  pgsty/pg_exporter:1.4.1

curl -fsS http://127.0.0.1:9630/up
Mount a secret and a custom collector file
docker run -d \
  --name pg_exporter \
  --restart unless-stopped \
  -p 127.0.0.1:9630:9630 \
  -e PG_EXPORTER_URL_FILE=/run/secrets/pgurl \
  -v ./pgurl:/run/secrets/pgurl:ro \
  -v ./pg_exporter.yml:/etc/pg_exporter.yml:ro \
  pgsty/pg_exporter:1.4.1

The integrated route: PG Exporter arrives with a PostgreSQL distribution, Prometheus-compatible storage, recording and alerting rules, and Grafana dashboards. The bootstrap only obtains Pigsty – choose an inventory before running it against any host.

Pigsty
Obtain Pigsty
curl -fsSL https://repo.pigsty.io/get | bash
cd ~/pigsty

For auditing, development, and custom build flags. A source build creates no service account and registers no system service; reproduce those controls deliberately if you need them.

Source
Build the exact release tag
git clone https://github.com/pgsty/pg_exporter.git
cd pg_exporter
git checkout "v1.4.1"
make build

./pg_exporter --version
PG_EXPORTER_URL='postgres://[email protected]:5432/postgres' ./pg_exporter --dry-run

Every file published with the release, with its SHA-256 digest. On macOS compare shasum -a 256 <file> against the entry for that file.

All artifacts

.rpm

Download asset
FileChecksum
pg-exporter-1.4.1-1.aarch64.rpm Linuxarm64SHA-256 7648f1852f12a17c5ecc9c2f6aed1888f443d6e650c5001f9c8a05d7e4822f13
pg-exporter-1.4.1-1.ppc64le.rpm LinuxSHA-256 09037731e2d4bd22dcabb9a386f381c67a782a05a0f9ed54517312d7ea8e6631
pg-exporter-1.4.1-1.x86_64.rpm Linuxamd64SHA-256 8dbf85ff6adc4b46b225b3a1e3be5a4a61130118eabee499865a88d04a3e1a93

.deb

Download asset
FileChecksum
pg-exporter_1.4.1-1_amd64.deb Linuxamd64SHA-256 cbe06eb161421a160d07b8c757864919d2ce1717b402630906235c471e411f38
pg-exporter_1.4.1-1_arm64.deb Linuxarm64SHA-256 36bc07ef2e3189b2acef06cf602ec9800ad6dc8b619ab5b2bfa5f900d9975cff
pg-exporter_1.4.1-1_ppc64le.deb LinuxSHA-256 8228e6a9b73d68aafedf6b4ed795636b9528c254052709086de4fa5084707aad

.tar.gz

Download asset
FileChecksum
pg_exporter-1.4.1.darwin-amd64.tar.gz macOSamd64SHA-256 e6de4c890af8d1c54b4a597e9fd02329e9caa543604c8406270a7a3c842d76f4
pg_exporter-1.4.1.darwin-arm64.tar.gz macOSarm64SHA-256 6fe0b19398983587fbe5e9a31dd8de0aeaf03b6b91a6fe22fc71f63ba703a79f
pg_exporter-1.4.1.linux-amd64.tar.gz Linuxamd64SHA-256 f2f952dbcf1ae09027bcee4ea4921d2b34f9f58ffbc7e3a2d42113f2cc94a340
pg_exporter-1.4.1.linux-arm64.tar.gz Linuxarm64SHA-256 e111974a12175d5f65c4ee0fb888604e6b343d893476ef4e88264a4c9601e8b4
pg_exporter-1.4.1.linux-ppc64le.tar.gz LinuxSHA-256 7b8679de0d58373f5f570c0560125fb465f91e7a4d71223699e81c9ca6b84469
pg_exporter-1.4.1.windows-amd64.tar.gz Windowsamd64SHA-256 93c0231fbd3eae45604b0c723cf413b2bec5e0cfa652912b12fdf400f1761db4

Then what

Where to go from here

Operate

Production deployment

Credentials, TLS, HTTP exposure, systemd and container restart policy, probes, and auto-discovery.

Read

Configure

Collector configuration

Define version-aware metrics in YAML and SQL, with per-collector TTL, timeout, skip, and fatal behaviour.

Read

Inspect

HTTP API

/metrics, /up, /explain, /stat, /reload, and the primary/replica routing endpoints.

Read

Reference

Installation reference

The complete artifact matrix, repository layout, and per-file release table.

Read

Reference

Compatibility matrix

PostgreSQL 10–19+, PgBouncer 1.8–1.25+, and what changes on the 9.x branch.

Read

History

Release archive

One bilingual note for every tag, from v0.0.1 to today, with its artifacts and upgrade notes.

Read

Metrics flowing?Bring the rest of the stack — rules, dashboards, and a PostgreSQL distribution — with Pigsty, or read the source.