This is the multi-page printable view of this section. .
PG Exporter 1.4 Documentation
The ultimate monitoring experience for PostgreSQL with 600+ metrics, declarative configuration, and dynamic planning capabilities.
Get Started | GitHub | Live Demo
Features
| Feature | Description |
|---|---|
| Comprehensive Metrics | 600+ metrics covering nearly every statistics view of PostgreSQL (10-19+) and pgBouncer (1.8-1.25+) |
| Declarative Collectors | Every metric comes from a YAML collector definition — a SQL query plus execution conditions; add, change, or remove metrics without touching code |
| Dynamic Planning | Each collector branch is admitted per target based on version, primary/replica role, installed extensions, and tags |
| Auto-Discovery | Automatically discovers and scrapes every database in an instance, distinguished by the datname label |
| Health Check APIs | /up, /primary, /replica endpoints serve directly as load-balancer probes for primary/replica traffic routing |
| Smart Caching | Per-collector TTL caching decouples scrape frequency from query frequency — probe and scrape storms never reach the database |
| Snapshot Histograms | HISTOGRAM column type aggregates SQL snapshots into classic Prometheus histogram distributions |
| Extension Aware | Native support for pg_stat_statements, pg_wait_sampling, citus, and timescaledb |
| Production Ready | Battle-tested in real-world environments across 12K+ cores for 6+ years |
Version Info
- Current stable release:
v1.4.1 - Default config support: PostgreSQL 10-19+
- Legacy config support: PostgreSQL 9.1-9.6 via the
legacy/config bundle - pgBouncer support: 1.8-1.25+
See Release Notes for the full history.
Design Rationale
pg_exporter is built around a few simple production-oriented principles:
- Local-first connectivity: fall back to
postgresql:///?sslmode=disablewhen no explicit URL is provided, which fits same-host deployments - Declarative collection: metric behavior is driven by YAML collector definitions with precise control over
ttl,timeout,tags, andfatal - Dynamic planning: choose the appropriate collector branch at runtime based on server version, role, extensions, and tags
- Keep serving under failure: use non-blocking startup by default so HTTP endpoints still come up while the database is temporarily unavailable
- Hot reload: support
POST/GET /reloadandSIGHUPreloads, with extraSIGUSR1support on non-Windows platforms - Split probes from traffic: health endpoints use cached background probes instead of blocking the database on every request
- Tighten the management surface:
/reload,/explain, and/statexpose runtime and config details, so production deployments should protect them with--web.config.fileor keep them internal
Installation
PG Exporter provides multiple installation methods to fit your infrastructure:
Quick Start
Get PG Exporter up and running in minutes with Getting Started:
Documentation
- Getting Started - Quick start guide and basic concepts
- Installation - Installation instructions for all platforms
- Configuration - Configuration reference and examples
- Deployment - Production deployment best practices
- Collectors - Detailed documentation for all metric collectors
Live Demo
Experience PG Exporter in action with our live demo environment: https://g.pgsty.com
The demo showcases real PostgreSQL clusters monitored by PG Exporter, featuring:
- Real-time metrics visualization with Grafana
- Multiple PostgreSQL versions and configurations
- Extension-specific metrics and monitoring
- Complete observability stack powered by Pigsty
Community & Support
- GitHub - Source code, issues, and contributions
- Discussions - Ask questions and share experiences
- Pigsty - Complete PostgreSQL Distro with PG Exporter
License
PG Exporter is open-source software licensed under the Apache License 2.0.
Copyright 2018-2026 © Ruohang Feng / [email protected]
1 - Getting Started
This page is the shortest path: install pg_exporter, connect it to a PostgreSQL instance, verify metrics output, and hook it into Prometheus.
You only need two things: a reachable PostgreSQL 10-19+ (or pgBouncer 1.8+) instance, and permission to create a user in it. For older PostgreSQL 9.1-9.6 instances, see Compatibility.
Step 1: Install
On Linux amd64 you can download the binary directly (for other platforms and RPM/DEB/Docker options, see the Installation guide):
Confirm the installation:
Step 2: Create a Monitoring User
Create a dedicated monitoring user on the target PostgreSQL. The built-in pg_monitor role (PostgreSQL 10+) covers all read permissions the default collectors need:
If you are just trying it out locally as a superuser like postgres, you can skip this step.
Step 3: Run and Verify
Use --dry-run to confirm the configuration parses, then start for real:
Without any URL, pg_exporter falls back to the local-first default postgresql:///?sslmode=disable, which fits running on the same host as PostgreSQL. The full URL source precedence (--url > PG_EXPORTER_URL > PGURL > PG_EXPORTER_URL_FILE > default) is documented in the Deployment guide.
Pull the metrics from another terminal:
You should see the three core built-in metrics:
pg_up 1 means the pipeline works — the remaining 600+ metrics (pg_db_*, pg_table_*, pg_wal_*, …) all come from the declarative collector definitions in pg_exporter.yml. If pg_up is 0, restart with pg_exporter --log.level=debug and inspect the connection error.
Step 4: Hook into Prometheus
Add a scrape target in prometheus.yml:
Collectors cache results per their ttl (most realtime collectors use ttl: 10): as long as the TTL is below the scrape interval, every scrape gets fresh data, while high-frequency scraping can never overwhelm the database. This is also why setting scrape_interval below the common TTLs is not recommended.
That’s it. For Grafana, you can reuse the PostgreSQL dashboards from Pigsty, or explore the live demo.
Troubleshooting
| Symptom | What to do |
|---|---|
pg_up 0, connection fails | Run pg_exporter --log.level=debug and read the error; check URL, pg_hba.conf, and network reachability |
| Some metrics are missing | curl localhost:9630/explain to see each collector’s planning verdict (version gates, tags, predicates) |
| A collector keeps failing | curl localhost:9630/stat for per-collector error counters and durations |
| Scrapes are slow | Find the slow collector in /stat, raise its ttl, or set skip: true |
/stat, /explain, and /reload are management endpoints — protect them with --web.config.file (TLS/auth) or keep them on a trusted network in production. See the API Reference.
Next Steps
- Monitor pgBouncer, enable auto-discovery, deploy with systemd / Docker / Kubernetes: Deployment guide
- Understand and customize collectors (GAUGE/COUNTER/HISTOGRAM, TTL, tags, version gates): Configuration reference
- Health check and primary/replica traffic routing endpoints (
/up,/primary,/replica): API Reference
2 - Installation
pg_exporter can be installed via Pigsty, YUM/APT repositories, GitHub release packages (RPM/DEB/Tarball), Docker images, or built from source — pick whichever fits your infrastructure.
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 |
3 - Configuration
Every business metric in pg_exporter is driven by a YAML collector definition: one SQL query plus its execution conditions (version, role, tags, predicates) and runtime controls (caching, timeout). This page is the complete reference for collector definitions.
A configuration can be a single YAML file (like the default pg_exporter.yml) or a directory of YAML files — the official default bundle is merged from the 58 definition files under config/.
Configuration Loading
PG Exporter searches for configuration in the following order:
- Command-line argument:
--config=/path/to/config - Environment variable:
PG_EXPORTER_CONFIG=/path/to/config - Current directory:
./pg_exporter.yml - System config file:
/etc/pg_exporter.yml - System config directory:
/etc/pg_exporter/
Directory mode details:
- Only
.yml/.yamlfiles in that directory are loaded, non-recursively - Files are merged in lexicographic order; later files override earlier collector definitions with the same top-level name
- If a config directory contains YAML files but every one of them fails to parse, the exporter returns an error instead of silently ignoring the directory
Collector Structure
Each collector is a top-level object in the YAML configuration with a unique name and various properties:
Validation rules:
- Each entry in
metricsmust define exactly one column mapping - Each collector must expose at least one
GAUGE,COUNTER, orHISTOGRAMcolumn usageonly acceptsGAUGE,COUNTER,HISTOGRAM,LABEL, orDISCARDHISTOGRAMcolumns must definebucket: a finite, strictly increasing list of bucket upper bounds; the+Infbucket is appended automatically- Metric names and label names are validated against Prometheus naming rules during load; invalid configs fail fast
- Constant labels are checked for conflicts during load; they cannot overlap with query labels or built-in dynamic labels such as
datnameandquery; when anyHISTOGRAMcollector is configured,leis reserved and cannot be used as a constant label - The SQL result must include every column declared as
LABEL; sincev1.4.1, a missing label column fails that collector’s entire scrape instead of emitting an empty label or retaining stale results, while other non-fatal collectors continue normally - If you use one-line inline
metricsdefinitions, keepdescriptionvalues double-quoted to avoid YAML ambiguity
Core Configuration Elements
Collector Branch Name
The top-level key uniquely identifies a collector across the entire configuration:
Query Definition
The SQL query that retrieves metrics:
Metric Types
Each column in the query result must be mapped to a metric type:
| Usage | Description | Example |
|---|---|---|
GAUGE | Instantaneous value that can go up or down | Current connections |
COUNTER | Cumulative value that only increases | Total transactions |
HISTOGRAM | Snapshot histogram deriving _bucket / _count / _sum series | Transaction age distribution |
LABEL | Use as a Prometheus label | Database name |
DISCARD | Ignore this column | Internal values |
Histogram Columns (HISTOGRAM)
v1.4.0 introduces the HISTOGRAM column type: every row returned by the query counts
as one observation, aggregated per label group into a classic Prometheus histogram
snapshot, deriving three series families: <name>_bucket (with the le label and the
+Inf bucket), <name>_count, and <name>_sum:
Usage notes:
- This is a snapshot histogram: the whole distribution is rebuilt on every scrape,
so bucket counts can go up or down — gauge-like semantics.
histogram_quantile()works directly, butrate()/increase()over_count/_sumis meaningless - SQL
NULLobservations are ignored by default; with an explicitdefault, they count as the default value scaleis applied to the observation before bucket assignment; as with scalar columns, timestamp and boolean values are exempt fromscale- The
pg_xact_agecollector in the default bundle serves as the reference implementation
Cache Control (TTL)
The ttl parameter controls result caching:
Best practices:
- Set TTL less than your scrape interval
- Use longer TTL for expensive queries
- TTL of 0 disables caching
Timeout Control
Prevent queries from running too long:
Version Compatibility
Control which PostgreSQL versions can run this collector:
Version numbers follow PostgreSQL server_version_num rules:
100000= 10.0130200= 13.2160100= 16.1190000= 19.090600= 9.6, relevant when using the legacy config bundle
Execution Model
Understanding the full path from a collector definition to emitted metrics helps answer “why is this metric missing”:
- Planning (on connection setup or hot reload): each collector branch is checked in turn — target type (PostgreSQL / pgBouncer),
min_version/max_versiongates,tagsmatching against server role and exporter tags, and theskipswitch. Branches that fail any check are not installed on that target.curl localhost:9630/explainshows exactly the verdict of this step. - Scraping (on every
/metricsrequest): for each installed collector — if the cache is still withinttl, the cached result is returned; otherwisepredicate_queriesrun first (any false verdict skips this round and bumpspg_exporter_query_scrape_predicate_skip_count), then the main query executes undertimeout, and results are converted to metrics and cached. - Failure semantics: a normal collector failure only affects itself (
pg_exporter_query_scrape_error_countgoes up, its metric group is absent this round); a failing collector markedfatal: truefails the whole server scrape.
Tag System
Tags control when and where collectors execute:
Built-in Tags
| Tag | Description |
|---|---|
cluster | Execute once per PostgreSQL cluster |
primary / master | Only on primary servers |
standby / replica | Only on replica servers |
pgbouncer | Only for pgBouncer connections |
Prefixed Tags
| Prefix | Example | Description |
|---|---|---|
dbname: | dbname:postgres | Only on specific database |
username: | username:monitor | Only with specific user |
extension: | extension:pg_stat_statements | Only if extension installed |
schema: | schema:public | Only if schema exists |
not: | not:slow | NOT when exporter has tag |
Custom Tags
Pass custom tags to the exporter:
Then use in configuration:
Predicate Queries
Execute conditional checks before main query:
The main query only executes if all predicates return true.
Metric Definition
Basic Definition
Advanced Options
Collector Organization
PG Exporter ships with pre-organized collectors:
| Range | Category | Description |
|---|---|---|
| 0xx | Documentation | Examples and documentation |
| 1xx | Basic | Server info, settings, metadata |
| 2xx | Replication | Replication, slots, receivers |
| 3xx | Persistence | I/O, checkpoints, WAL |
| 4xx | Activity | Connections, locks, queries |
| 5xx | Progress | Vacuum, index creation progress |
| 6xx | Database | Per-database statistics |
| 7xx | Objects | Tables, indexes, functions |
| 8xx | Optional | Expensive/optional metrics |
| 9xx | pgBouncer | Connection pooler metrics |
| 10xx+ | Extensions | Extension-specific metrics |
Real-World Examples
Simple Gauge Collector
Counter with Labels
Version-Specific Collector
Extension-Dependent Collector
Custom Collectors
Creating Your Own Metrics
- Create a new YAML file in your config directory:
- Test your collector:
Conditional Metrics
Use predicate queries for conditional metrics:
Performance Optimization
Query Optimization Tips
Use appropriate TTL values:
- Fast queries: 1-10 seconds
- Medium queries: 10-60 seconds
- Expensive queries: 300-3600 seconds
Set realistic timeouts:
- Default: 100ms
- Complex queries: 500ms-1s
- Never disable timeout in production
Use cluster-level tags:
Disable expensive collectors:
Monitoring Collector Performance
Check collector execution statistics:
Troubleshooting Configuration
Validate Configuration
Common Issues
| Problem | Solution |
|---|---|
| Metrics missing | Check tags and version compatibility |
| Slow scrapes | Increase TTL, add timeout, disable expensive queries |
| High memory usage | Reduce result set size, use LIMIT |
| Permission errors | Verify query permissions for monitoring user |
Debug Logging
Enable debug logging to troubleshoot:
4 - API Reference
pg_exporter exposes four kinds of HTTP endpoints on its listen port (default :9630): metrics, health checks, traffic routing, and operational management. The full endpoint list:
| Endpoint | Method | Description |
|---|---|---|
/metrics | GET | Prometheus metrics endpoint (path configurable via --web.telemetry-path) |
/up | GET | Aliveness check; aliases /health, /liveness, /readiness, /read |
/primary | GET | Primary check; aliases /leader, /master, /read-write, /rw |
/replica | GET | Replica check; aliases /standby, /slave, /read-only, /ro |
/reload | GET/POST | Hot-reload collector configuration |
/explain | GET | Show per-collector planning decisions |
/stat | GET | Per-collector runtime statistics (hits / errors / duration) |
/version | GET | Version and build information (plain text) |
/ | GET | Landing page linking to the metrics endpoint |
Health and routing endpoints answer from a cached background-probe role state (primary / replica / down / starting / unknown) — they never query the database synchronously per HTTP request, so probe storms cannot reach the database.
Metrics Endpoint
GET /metrics
The primary endpoint that exposes all collected metrics in Prometheus format.
Request
Response
Response Format
Metrics follow the Prometheus exposition format:
Self-Monitoring Metrics
Besides business metrics defined by YAML collectors, /metrics also exposes the exporter’s own runtime metrics (disable the pg_exporter_* part with --disable-intro; the prefix follows --namespace and becomes pgbouncer_ in pgBouncer mode):
| Metric | Labels | Description |
|---|---|---|
pg_up | — | 1 when the target database is reachable, 0 otherwise |
pg_version | — | Server version in server_version_num format |
pg_in_recovery | — | 1 when in recovery mode (replica) |
pg_exporter_build_info | version, revision, … | Constant 1 with build info in labels |
pg_exporter_up | — | Constant 1 while the exporter is alive |
pg_exporter_uptime | — | Seconds since the exporter started |
pg_exporter_scrape_total_count / _error_count | — | Cumulative scrape / failure counts |
pg_exporter_scrape_duration | — | Duration of the last scrape in seconds |
pg_exporter_last_scrape_time | — | Timestamp of the last scrape |
pg_exporter_server_scrape_* | datname | Per-database scrape duration and success/failure counters |
pg_exporter_query_scrape_duration | datname, query | Last execution duration per collector |
pg_exporter_query_scrape_total_count / _error_count | datname, query | Execution / failure counts per collector |
pg_exporter_query_scrape_hit_count / _metric_count | datname, query | Rows returned / metrics emitted per collector |
pg_exporter_query_scrape_predicate_skip_count | datname, query | Times skipped because a predicate returned false |
pg_exporter_query_cache_ttl | datname, query | Result cache TTL per collector |
pg_exporter_query_scrape_duration and _error_count pinpoint slow and failing collectors directly — the machine-readable equivalent of /stat.
Health Checks
Health endpoints provide multiple ways to monitor PG Exporter and the target database state.
GET /up
Simple aliveness check based on cached background probe state. It does not actively probe the database on every HTTP request.
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Target is available (primary / replica) |
| 503 | Service Unavailable | Target is unavailable (down / starting / unknown) |
Example
GET /health
Alias of /up with identical behavior.
GET /liveness and GET /readiness
Path aliases provided for Kubernetes probe conventions, with behavior identical to /up (same handler):
Note that both share the same semantics: they return 503 when the target database is unreachable. If you don’t want “database down” to restart the exporter Pod, use a TCP probe on the listen port for liveness instead.
Traffic Routing
These endpoints are designed for load balancers and proxies to route traffic based on server role.
GET /primary
Check whether the server is a primary instance.
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Server is primary and accepting writes |
| 404 | Not Found | Server is not primary and is acting as a replica |
| 503 | Service Unavailable | Server is unavailable (down / starting / unknown) |
Aliases
/leader/master/read-write/rw
Example
GET /replica
Check whether the server is a replica instance.
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Server is a replica and in recovery |
| 404 | Not Found | Server is not a replica and is acting as primary |
| 503 | Service Unavailable | Server is unavailable (down / starting / unknown) |
Aliases
/standby/read-only/ro
/slave remains compatible, but /replica is the preferred name.
Example
GET /read
Check whether the server can handle read traffic. Both primaries and replicas may return success.
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Server is healthy and can handle reads |
| 503 | Service Unavailable | Server is unavailable (down / starting / unknown) |
Example
Operational Endpoints
GET /reload / POST /reload
Reload configuration without restarting the exporter.
Request
Response
Response Codes
| Code | Status | Description |
|---|---|---|
| 200 | OK | Reload completed successfully |
| 500 | Internal Server Error | Reload failed and returns fail to reload: ... |
| 405 | Method Not Allowed | Non-GET/POST request, with Allow: GET, POST |
Use Cases
- Update collector definitions
- Change query parameters
- Modify cache TTL values
- Add or remove collectors
Reload refreshes collector configuration and query plans. Process-level settings such as listen addresses and CLI arguments still require a restart.
/reload, /explain, and /stat are management endpoints. If the exporter is reachable beyond localhost or a trusted private network, protect them with --web.config.file or restrict access at the reverse proxy or firewall layer.
GET /explain
Display planned collector execution details for all configured collectors.
Request
Response
GET /stat
Show runtime statistics, including collector execution times and success/error counters.
Request
Response
This endpoint is useful when identifying slow or problematic collectors.
Using with Load Balancers
HAProxy Example
A Note on Nginx
Open-source Nginx does not support active out-of-band HTTP health checks (the health_check directive is an NGINX Plus feature), and PostgreSQL traffic requires the stream module rather than http proxying. For role-based PostgreSQL traffic routing, prefer HAProxy as shown above, or solutions like Patroni + vip-manager.
5 - Deployment
This page covers what it takes to run pg_exporter in production: process arguments and environment variables, monitoring user and credential management, the systemd / Docker / Kubernetes deployment forms, pgBouncer and auto-discovery, plus scrape and alerting configuration on the Prometheus side.
Process-level configuration comes from two sources, in decreasing precedence:
- Command-line arguments (
--url,--config, …) - Environment variables (every flag has a corresponding
PG_EXPORTER_*variable)
Metric collection behavior is entirely driven by YAML collector definitions (default /etc/pg_exporter.yml, or a config directory) — see the Configuration reference.
Command-Line Arguments
The full flag list from pg_exporter --help:
Two deployment-relevant behaviors worth knowing:
- Startup policy: non-blocking startup is the default — when the target database is temporarily unreachable, the HTTP endpoints come up anyway and a background probe keeps retrying until recovery. If you prefer “fail on unreachable” (e.g. delegating restart decisions to systemd or an orchestrator), set
--fail-fast. - Telemetry path validation: since v1.4.0,
--web.telemetry-pathis strictly validated at startup — empty paths, conflicts with built-in endpoints, or non-canonical paths like//metricsthat could never match fail immediately with a clear error.
Connection URL Sources
The connection string resolves from the following sources, first non-empty value wins:
--url/-ucommand-line argumentPG_EXPORTER_URLenvironment variablePGURLenvironment variable- Content of the file pointed to by
PG_EXPORTER_URL_FILE(fits container Secret mounts) - Default
postgresql:///?sslmode=disable(local-first, fits same-host deployment)
When the URL omits sslmode, sslmode=disable is appended automatically. Also, libpq service-file environment variables (PGSERVICE / PGSERVICEFILE, etc.) are cleared at startup with a log line — service files could override the explicit connection target, and pg_exporter guarantees that the URL announced in logs is the URL actually connected to.
Monitoring User and Credentials
Create the Monitoring User
Keeping CONNECTION LIMIT is recommended: the exporter normally holds only one to a few connections (one per database with auto-discovery), and the limit prevents connection exhaustion on misconfiguration.
Manage Passwords with .pgpass
Take the password out of the URL and let libpq’s .pgpass provide it:
Packaged services run as the prometheus system user. Since v1.4.0 its HOME points to /var/lib/prometheus (where libpq looks up ~/.pgpass), but the package does not create that directory. Before using .pgpass, run:
install -d -o prometheus -g prometheus /var/lib/prometheus
TLS for the Database Connection
Protecting the HTTP Port
Beyond /metrics, the /reload, /explain, and /stat management endpoints let anyone with port access read configuration and runtime state, or trigger reloads. If the exporter is reachable from a shared network, enable TLS / Basic Auth via --web.config.file (exporter-toolkit web configuration), or restrict access at the firewall / reverse-proxy layer.
Systemd Deployment (RPM/DEB packages)
The RPM/DEB packages ship a service unit and an environment file; after installation, edit the environment file and start:
Environment file /etc/default/pg_exporter (package defaults):
Every command-line flag has a corresponding environment variable — append what you need here (e.g. PG_EXPORTER_DISABLE_INTRO). The file is packaged as noreplace, so upgrades never overwrite your edits.
Common operations:
Docker Deployment
Docker Compose:
The official image is built from scratch and contains no system CA certificates. When connecting to remote PostgreSQL with sslmode=verify-ca / verify-full, mount a CA certificate explicitly and point sslrootcert at it, or TLS verification cannot complete.
Kubernetes Deployment
You can also use PG_EXPORTER_URL_FILE pointing at a Secret-mounted file, keeping the connection string out of environment variables.
Auto-Discovery
Auto-discovery (enabled by default) lets one exporter instance monitor every database in the target PostgreSQL:
Behavior:
- Cluster-level collectors (
tags: [cluster]) run once on the primary connection - Database-level collectors run on every discovered database, with metrics distinguished by the
datnamelabel - Newly created / dropped databases are picked up / removed in subsequent planning cycles
Monitoring pgBouncer
Set the database name in the URL to pgbouncer to switch to pgBouncer mode (this is what triggers the detection):
In pgBouncer mode, the exporter uses the pgbouncer metric prefix and runs only pgBouncer-specific collectors (SHOW STATS / SHOW POOLS, etc.). The usual pattern is one exporter instance for PostgreSQL and another for pgBouncer, on different ports.
Prometheus Scraping and Alerting
Scrape Configuration
Kubernetes service discovery:
Keep the scrape interval at or above the common collector ttl (mostly 10 seconds in the default bundle): TTL caching means more frequent scrapes would only receive cached results anyway.
Alert Rules
All rules below are based on metrics that actually exist:
Role-Based Traffic Routing
The /primary, /replica, and /read health-check endpoints can serve directly as health probes for HAProxy and similar load balancers, enabling primary/replica read-write splitting. Endpoint semantics and a complete HAProxy example are in the API Reference.
Note: open-source Nginx does not support active out-of-band HTTP health checks (health_check is an NGINX Plus feature). For role-based PostgreSQL traffic routing, prefer HAProxy, or solutions like Patroni + vip-manager.
6 - Release Notes
The latest stable version of pg_exporter is v1.4.1
| Version | Date | Summary | GitHub |
|---|---|---|---|
| v1.4.1 | 2026-07-29 | Subscription count and label validation fixes; RPM rename | v1.4.1 |
| v1.4.0 | 2026-07-18 | Snapshot histograms, pg_xact_age collector, HTTP hardening | v1.4.0 |
| v1.3.0 | 2026-06-24 | PostgreSQL 19 support, new PG19 collectors and branches | v1.3.0 |
| v1.2.2 | 2026-04-14 | Routine Go 1.26.2 refresh, no functional changes | v1.2.2 |
| v1.2.1 | 2026-03-21 | Config style cleanup, Go 1.26.1 refresh | v1.2.1 |
| v1.2.0 | 2026-02-12 | Hot reload, non-blocking startup, PG9.x legacy support | v1.2.0 |
| v1.1.2 | 2026-01-16 | fix pg_timeline conf issue, build with latest deps | v1.1.2 |
| v1.1.1 | 2025-12-30 | New pg_timeline collector, pg_sub_16 branch, bug fixes | v1.1.1 |
| v1.1.0 | 2025-12-15 | Update default metrics collectors, bump to go 1.25.5 | v1.1.0 |
| v1.0.3 | 2025-11-20 | Routine update on 1.25.4, fix unsupported libpq env | v1.0.3 |
| v1.0.2 | 2025-08-14 | Build for more os arch with goreleaser | v1.0.2 |
| v1.0.1 | 2025-07-17 | DockerHub images, Go 1.24.5, disable pg_tsdb_hypertable | v1.0.1 |
| v1.0.0 | 2025-05-06 | PostgreSQL 18 support, new WAL/checkpointer/I/O metrics | v1.0.0 |
| v0.9.0 | 2025-04-26 | TimescaleDB, Citus, pg_wait_sampling collectors | v0.9.0 |
| v0.8.1 | 2025-02-14 | Dependencies update, docker image tags | v0.8.1 |
| v0.8.0 | 2025-02-14 | PgBouncer 1.24 support, Go 1.24, logging refactor | v0.8.0 |
| v0.7.1 | 2024-12-29 | Routine update, configuration as Reader support | v0.7.1 |
| v0.7.0 | 2024-08-13 | PostgreSQL 17 support, predicate queries feature | v0.7.0 |
| v0.6.0 | 2023-10-18 | PostgreSQL 16 support, ARM64 packages, security fixes | v0.6.0 |
| v0.5.0 | 2022-04-27 | RPM/DEB builds, column scaling, metrics enhancements | v0.5.0 |
| v0.4.1 | 2022-03-08 | Collector updates, connect-timeout parameter | v0.4.1 |
| v0.4.0 | 2021-07-12 | PostgreSQL 14 support, auto-discovery feature | v0.4.0 |
| v0.3.2 | 2021-02-01 | Shadow DSN fixes, documentation updates | v0.3.2 |
| v0.3.1 | 2020-12-04 | Configuration fixes for older PostgreSQL versions | v0.3.1 |
| v0.3.0 | 2020-10-29 | PostgreSQL 13 support, REST APIs, dummy server | v0.3.0 |
| v0.2.0 | 2020-03-21 | YUM packages, configuration reload support | v0.2.0 |
| v0.1.2 | 2020-02-20 | Dynamic configuration reload, bulky mode | v0.1.2 |
| v0.1.1 | 2020-01-10 | Startup hang bug fix | v0.1.1 |
| v0.1.0 | 2020-01-08 | Initial stable release | v0.1.0 |
| v0.0.4 | 2019-12-20 | Production tested release | v0.0.4 |
| v0.0.3 | 2019-12-14 | Production environment testing | v0.0.3 |
| v0.0.2 | 2019-12-09 | Early testing release | v0.0.2 |
| v0.0.1 | 2019-12-06 | Initial release with PgBouncer mode | v0.0.1 |
v1.4.1
v1.4.1 is a maintenance release focused on metric accuracy and RPM upgrade compatibility.
Highlights:
- Fix
pg_subrel_countovercounting when parallel logical replication apply workers are active: deduplicatepg_stat_subscriptionby subscription ID and name before aggregating subscription relation states - If a query result omits a configured
LABELcolumn, that collector’s scrape now fails atomically instead of emitting an empty label or retaining stale results; other non-fatal collectors continue normally - Rename the official RPM package and artifact prefix from
pg_exportertopg-exporter; the new package provides and obsoletes the legacy name, allowing direct upgrades - Refresh version and standalone package metadata, add missing-label regression coverage, and validate RPM configuration, artifact names, and compatibility metadata in CI
Upgrade Notes:
- Custom collector SQL must return every
LABELcolumn; the result schema must remain complete even when the query returns zero rows - If automation matches GitHub RPM file names directly, update
pg_exporter-*.rpmtopg-exporter-*.rpm
https://github.com/pgsty/pg_exporter/releases/tag/v1.4.1
v1.4.0
v1.4.0 introduces the Snapshot Histogram metric type and the new pg_xact_age transaction age collector, along with a round of systematic hardening across HTTP routing, packaging, and the build toolchain.
New Features:
- New
HISTOGRAMcolumn type: SQL query snapshots can be aggregated per label group into classic Prometheus histograms, deriving_bucket/_count/_sumseries families; bucket bounds are strictly validated at config load time (finite, strictly increasing,+Infappended automatically),lebecomes a reserved label, and hot reload is fully supported - New
pg_xact_agecollector: exposes the distribution of open transaction age (pg_xact_age_seconds) and idle-in-transaction age (pg_xact_age_idle_seconds) as histograms; cluster-level collection, client backends only, 10s TTL - Default config bundle grows from 57 to 58 definition files;
pg_xact_agetakes slot0450, withpg_lock/pg_lock_stat/pg_queryrenumbered to0460/0470/0480(contents unchanged)
Fixes & Improvements:
- HTTP route registration is isolated to a private ServeMux instead of the global
DefaultServeMux, so endpoints registered by third-party libraries can no longer be exposed accidentally --web.telemetry-pathis strictly validated at startup: empty paths, paths not starting with/, paths containing?#{}, conflicts with built-in endpoints, and non-canonical paths like//metricsthat could never be matched all fail fast with a clear error- The landing page HTML-escapes the telemetry path
- The primary connection pool is properly closed when
--fail-fastpre-check fails - RPM / DEB packaging fixes (#105): the
prometheussystem user’s HOME now points to/var/lib/prometheus(where libpq looks for~/.pgpass), and the packaged default URL gains the/postgresdatabase name so libpq no longer falls back to a database named after the OS user - Version string unified with the
vprefix:--versionoutput, the/versionendpoint, and thepg_exporter_build_info{version=...}label of official release binaries now reportv1.4.0(GoReleaser artifacts previously reported unprefixed1.3.0); artifact file names, package versions, and Docker image tag conventions are unchanged - Histogram value casting aligned with the scalar path: timestamp and boolean columns are exempt from
scale - GoReleaser embedded package metadata corrected: supported range updated to PostgreSQL
9.x - 19+and pgBouncer1.8 - 1.25+ make dockerrestoresGOPROXY/GOSUMDBbuild-arg passthrough
Engineering & Build:
- Build toolchain updated to Go
1.26.5, exporter-toolkitv0.17.1, and prometheus/commonv0.70.0 - New regular CI verification workflow: module tidy check, generated-config drift check (
make confoutput must stay in sync withconfig/*.yml), race tests, and six-platform cross-builds - Docker build tooling consolidated: the
docker/scripts andmake docker-releaseare removed; multi-arch release images are built by GoReleaser - Config coverage tests generalized: tests no longer assume specific collectors exist in the config directory, making trimmed custom bundles easier to maintain
Upgrade Notes:
- If you were running with a non-canonical telemetry path (e.g.
//metrics), the process will now refuse to start — previously it started but the metrics endpoint was silently unreachable - Automation that parses the
versionlabel ofpg_exporter_build_infoor the--versionoutput needs to accommodate thevprefix - When any
HISTOGRAMcollector is configured,lecan no longer be used as a constant label
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.4.0/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.4.0
v1.3.0
v1.3.0 adds PostgreSQL 19 support, and refreshes the default collector bundle, build toolchain, and config coverage tests.
Highlights:
- Default support range extended from PostgreSQL 10-18+ to 10-19+
- Default config bundle includes 57
config/*.ymldefinition files - Build dependencies updated to Go
1.26.4,lib/pq v1.12.3, Prometheus clientv1.23.2, and exporter-toolkitv0.16.0 pg_recovery_state: collectpg_stat_recoveryon recovery nodes, exposing promotion trigger status, replay LSN, timeline, recovery transaction time, and pause statepg_lock_stat: collect PG19pg_stat_lock, exposing waits, wait time, and fast-path overflow counts bylocktypepg_vacuum_score: collect the current-database summary frompg_stat_autovacuum_scores, exposing max autovacuum score and candidate table countpg_wal_19: exposewal_fpi_byteson PG19 aspg_wal_fpi_bytespg_sub_19: adapt sequence sync and logical replication conflict stats frompg_stat_subscription_stats, while keepingsync_error_countfor legacy dashboardspg_recv: recognize the PG13+ WAL receiverconnectingstate on PG19pg_slot: recognize the PG19 replication slot invalidation reasonidle_timeoutpg_db_confl: switch to an explicit column list to avoid accidentally exporting future view columnspg_backup,pg_vacuuming, andpg_clusteringcontinue reusing stable existing branches instead of changing the metric surface for low-value PG19 fields
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.3.0/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.3.0
v1.2.2
v1.2.2 is a routine maintenance release that only refreshes the release toolchain to Go 1.26.2. It does not introduce new collectors, config semantics, or runtime behavior changes.
Highlights
- Refresh the release toolchain: bump release builds to Go
1.26.2 - No functional changes: collector behavior, default configs, metric definitions, and runtime semantics remain unchanged
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.2.2/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.2.2
v1.2.1
v1.2.1 is a lightweight maintenance release focused on release engineering, config package consistency, and documentation/metadata refresh. It does not introduce new collector semantics or runtime behavior changes.
Highlights
- Refresh the build toolchain: bump both release workflows and Docker build images to Go
1.26.1 - Standardize config style: switch inline
descriptionvalues in both current and legacy configs to double-quoted form, and regenerate mergedpg_exporter.yml/legacy/pg_exporter.yml - Add config consistency tests: verify split and merged configs remain equivalent, and check inline metric description style to reduce configuration drift
- Refresh packaging metadata: update RPM / DEB support descriptions to PostgreSQL
9.x - 18+and pgBouncer1.8 - 1.25+, and refresh Pigsty documentation links
Checksums
https://github.com/pgsty/pg_exporter/releases/tag/v1.2.1
v1.2.0
v1.2.0 is a stability-and-compatibility focused minor release across startup flow, hot reload, health probing, config validation, and legacy support.
New Features:
- Add robust hot reload workflow: support platform-specific reload signals (
SIGHUP/SIGUSR1) and strengthenPOST /reloadto refresh configs and query plans without process restart - Switch startup to non-blocking mode: HTTP endpoints come up first even when target precheck fails, making recovery and monitoring integration smoother
- Add PostgreSQL 9.1-9.6 legacy config bundle: provide
legacy/configs and amake conf9target for easier onboarding of EOL PostgreSQL versions - Rework health probing architecture: use cached health snapshots with periodic probes for more consistent role-based health endpoints and smoother reload behavior
- Improve release engineering baseline: run
go testandgo vetin release workflows and bump build toolchain to Go 1.26.0
Bug Fixes:
- Fix multiple config parsing edge cases: reject malformed metrics entries, return explicit errors when config dirs fail to load valid YAML, and harden runtime fallbacks
- Fix CLI bool flag parsing to correctly handle
--flag=falsestyle arguments - Fix
/explainoutput/rendering behavior by adjusting content type handling and using safer template rendering - Fix predicate query and PG URL handling details: better BOOL/BOOLEAN predicate support, safer row lifecycle handling, and improved
dbnamequery-parameter parsing/redaction - Fix resource cleanup when auto-discovered targets are removed by closing dropped server connections asynchronously
- Fix metric/label validation details including const-label conflict checks, scaled default-value handling, and Prometheus naming/rule checks
Checksums
https://github.com/pgsty/pg_exporter/releases/tag/v1.2.0
v1.1.2
Minor release fixing pg_timeline configuration issue and building with latest go deps
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.1.2/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.1.2
v1.1.1
Minor release with new collectors and bug fixes.
New Features:
- New
pg_timelinecollector for timeline monitoring - New
pg_sub_16collector branch to exclude parallel operations in subscriptions (PostgreSQL 16+ compatibility)
Bug Fixes:
- Fix: Add coalesce for slotname in
pg_recvcollector to handle NULL values
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.1.1/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.1.1
v1.1.0
Build with Go 1.25.5 and latest dependencies, collector updates:
Collector Changes:
pg_setting: Major refactor for PG10-18 compatibility withmissing_oksupport- Add 13 new metrics:
max_parallel_workers,max_parallel_workers_per_gather,max_parallel_maintenance_workers,shared_buffers,maintenance_work_mem,effective_cache_size,fsync,full_page_writes,autovacuum,autovacuum_max_workers,checkpoint_timeout,checkpoint_completion_target,hot_standby,synchronous_commit,io_method - Rename
work_memory_sizetowork_mem - Change min_version from 9.6 to 10, explicit
::inttype casting
- Add 13 new metrics:
pg_size: Fix log directory size detection, uselogging_collectorcheck instead of path pattern matchingpg_table: Performance optimization, replace LATERAL subqueries with JOIN for better query performance; fixtuplesandfrozenxidmetric type from COUNTER to GAUGE; increase timeout from 1s to 2spg_vacuuming: Add PG17 collector branch with new metricsindexes_total,indexes_processed,dead_tuple_bytesfor index vacuum progress trackingpg_query: Increase timeout from 1s to 2s for high-load scenariospg_io: Fix typo inreusesdescription (“in reused” -> “is reused”)pg_checkpointer: Fix description for pg_checkpointer_10 (“9.4+” -> “9.4-17”)pg_db_confl: Fix description for pg_db_confl_15 (“9.1 - 16” -> “9.1 - 15”)- Format alignment fixes for
pg_db,pg_indexing,pg_clustering,pg_backup
Other Changes:
- Fix release year by @anayrat
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.1.0/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.1.0
v1.0.3
- Build with Go 1.25.4 and latest dependencies
- Fix #80 Conflict with libpq env variables
- Change default value of
auto-discoverytotrueby @kadaffy
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.0.3/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.0.3
v1.0.2
- Build with Go 1.25.0 and latest dependencies
- Dedicate website and homepage: https://exp.pgsty.com
- Release with goreleaser for more os/arch with CI/CD pipeline:
- add windows amd64 support
- add linux ppc64le support
Checksums
https://github.com/pgsty/pg_exporter/releases/download/v1.0.2/checksums.txt
https://github.com/pgsty/pg_exporter/releases/tag/v1.0.2
v1.0.1
- Add dockerhub images: pgsty/pg_exporter
- Bump go dependencies to the latest version, build with go 1.24.5
- Disable
pg_tsdb_hypertablecollector by default, sincetimescaledbcatalog is changed.
Checksums
https://github.com/pgsty/pg_exporter/releases/tag/v1.0.1
v1.0.0
Add PostgreSQL 18 metrics support
- new collector branch
pg_wal_18: - remove
write,sync,write_time,sync_timemetrics - move to
pg_stat_io - new collector branch
pg_checkpointer_18: - new metric
num_done - new metric
slru_written - new collector branch
pg_db_18: - new metric
parallel_workers_to_launch - new metric
parallel_workers_launched - new collector branch
pg_table_18: table_parallel_workers_to_launchtable_parallel_workers_launched- new collector branch
pg_io_18: - new series about WAL statistics
- new metric
read_bytes - new metric
write_bytes - new metric
extend_bytes - remove
op_bytesdue to fixed value - new collector branch
pg_vacuuming_18 - new metric
delay_time
https://github.com/pgsty/pg_exporter/releases/tag/v1.0.0
v0.9.0
Default Collectors
- new metrics collector for
timescaledbhypertable - new metrics collector for
citusdist node - new metrics collector for
pg_wait_samplingwait event profile pg_slotoverhaul: Add 16/17 pg_replication_slot metrics- allow
pg_slotcollector run on replica since 16/17 - refactor
pg_waitcollector to agg from all processes - restrict pg_clustering, pg_indexing, pg_vacuuming run on primary
- mark all
reset_timeasGAUGErather thanCOUNTER - fix
pg_recovery_prefetch_skip_fpwtype fromGAUGEtoCOUNTER - fix
pg_recv.statetype fromLABELtoGAUGE - Format collector in compact mode
- new default metric
pg_exporter_build_info/pgbouncer_exporter_build_info - add
server_encodingtopg_metacollector - add 12 new setting metrics to
pg_settingcollector
- wal_block_size
- segment_size
- wal_segment_size
- wal_level
- wal_log_hints
- work_mem
- hugepage_count
- hugepage_status
- max_wal_size
- min_wal_size
- max_slot_wal_keep_size
Exporter Codebase
- normalize collector branch name with min pg ver suffix
- Add license file to binary packages
- move
pgsty/pg_exporterrepo topgsty/pg_exporter - refactor
server.goto reduceCompatibleandPostgresPrecheckcomplexity - rename metrics collector with extra number prefix for better sorting
- bump dependencies to the latest version
- execute fatal collectors ahead of all non-fatal collectors, and fail fast
https://github.com/pgsty/pg_exporter/releases/tag/v0.9.0
v0.8.1
- Bump dependencies to the latest version
- Bump golang.org/x/net from 0.35.0 to 0.36.0 #67
- Update docker images building tags
https://github.com/pgsty/pg_exporter/releases/tag/v0.8.1
v0.8.0
- Add PgBouncer 1.24 new metrics support (stat, pool, database)
- Fix:
310-pg_size.ymlfails if log dir not set properly #64 by @Süleyman Vurucu - Build with the latest Go 1.24 and bump all dependencies
- Refactor logging with the standard
log/sloginstead ofgo-kit - Full Changelog: https://github.com/pgsty/pg_exporter/compare/v0.7.1...v0.8.0
https://github.com/pgsty/pg_exporter/releases/tag/v0.8.0
v0.7.1
Routine update with dependabot
- Feat: support specifying configuration as Reader by @ringerc in #62
- Bump golang.org/x/crypto from 0.21.0 to 0.31.0 by @dependabot in #63
- Fix some typos
- Full Changelog: https://github.com/pgsty/pg_exporter/compare/v0.7.0...v0.7.1
https://github.com/pgsty/pg_exporter/releases/tag/v0.7.1
v0.7.0
Refactor codebase for the latest go version.
- PostgreSQL 17 Metrics Support by @Vonng
- pg_exporter: predicate queries feature by @ringerc
- Do a clean build in the dockerfile by @ringerc by @ringerc
- pg_exporter: don’t panic after “bind: address already in use” by @ringerc
- pg_exporter: fix /stat endpoint formatting by @ringerc
- pg_exporter: omit default query properties on yaml export by @ringerc
- Exclude template DBs from discovery and schema-qualify discovery query by @ringerc
- Fix some typos and some metric description mistakes by @ringerc
- Switch from unmaintained lib/pq driver to pgx with stdlib wrapper by @ringerc
https://github.com/pgsty/pg_exporter/releases/tag/v0.7.0
v0.6.0
Security Enhancement: Fix security dependent-bot issue
Add pg16 collectors
Add
arm64&aarch64packagesRemove the
monitorschema requirement forpg_querycollectors (you have to ensure it with search_path or just installpg_stat_statementsin the defaultpublicschema)Fix pgbouncer version parsing message level from info to debug
Fix
pg_table_10_12collector missingrelidissue.Recognize the files with yml suffix in config directory by @Japin Li
https://github.com/pgsty/pg_exporter/releases/tag/v0.6.0
v0.5.0
Exporter Enhancement
- Build rpm & deb with
nfpm - Add
column.default, replace when metric value is NULL - Add
column.scale, multiply scale factor when metric value is float/int (e.g µs to second) - Fix
/statendpoint output - Add docker container
pgsty/pg_exporter
Metrics Collector
- scale bgwriter & pg_wal time unit to second
- remove pg_class collector and move it to pg_table & pg_inex
- add pg_class metrics to pg_table
- add pg_class metrics to pg_index
- enable pg_table_size by default
- scale pg_query pg_db pg_bgwriter pg_ssl pgbouncer_stat time metrics to second
https://github.com/pgsty/pg_exporter/releases/tag/v0.5.0
v0.4.1
- update default collectors
- omit citus & timescaledb schemas on object monitoring
- avoid duplicate pg_statio tuples
- support pgbouncer v1.16
- bug fix:
pg_replcollector overlap on pg 12
- new parameter:
-Tconnect-timeoutPG_EXPORTER_CONNECT_TIMEOUTthis can be useful when monitoring remote Postgres instances. - now
pg_exporter.yamlare renamed aspg_exporter.ymlin rpm package.
https://github.com/pgsty/pg_exporter/releases/tag/v0.4.1
v0.4.0
- Add PG 14 support
- Default metrics configuration overhaul. (BUT you can still use the old configuration)
- add
auto-discovery,include-databaseandexclude-databaseoption - Add multiple database monitoring implementations (with
auto-discovery = on)
https://github.com/pgsty/pg_exporter/releases/tag/v0.4.0
v0.3.2
- fix shadow DSN corner case
- fix typo & docs
https://github.com/pgsty/pg_exporter/releases/tag/v0.3.2
v0.3.1
fix default configuration problems (especially for versions lower than 13)
- setting
primary_conninfonot exists until PG13 - add
funcidlabel topg_funccollector to avoid func name duplicate label - fix version string to
pg_exporter
https://github.com/pgsty/pg_exporter/releases/tag/v0.3.1
v0.3.0
https://github.com/pgsty/pg_exporter/releases/tag/v0.3.0
- Change default configuration, Support PostgreSQL 13 new metrics (
pg_slru,pg_shmem,pg_query13,pg_backup, etc…) - Add a series of new REST APIs for health / recovery status check
- Add a dummy server with fake
pg_up 0metric, which serves before PgExporter is initialized. - Add
sslmode=disableto URL ifsslmodeis not given - fix typos and bugs
v0.2.0
- add yum package and linux service definition
- add a ‘skip’ flag into query config
- fix
pgbouncer_upmetrics - add conf reload support
https://github.com/pgsty/pg_exporter/releases/tag/v0.2.0
v0.1.2
- fix pgbouncer_up metrics
- add dynamic configuration reload
- remove ‘shard’ related logic
- add a ‘bulky’ mode to default settings
https://github.com/pgsty/pg_exporter/releases/tag/v0.1.2
v0.1.1
Fix the bug that pg_exporter will hang during start-up if any query is failed.
https://github.com/pgsty/pg_exporter/releases/tag/v0.1.1
v0.1.0
It works, looks good to me.
https://github.com/pgsty/pg_exporter/releases/tag/v0.1.0
v0.0.4
Tested in real world production environment with 200+ nodes for about 2 weeks. Looks good !
https://github.com/pgsty/pg_exporter/releases/tag/v0.0.4
v0.0.3
v0.0.3 Release, Tested in Production Environment
This version is already tested in a production environment.
This project is still under rapid evolution, I would say if you want use it in production , try with caution.
https://github.com/pgsty/pg_exporter/releases/tag/v0.0.3
v0.0.2
It’s ok to try now
https://github.com/pgsty/pg_exporter/releases/tag/v0.0.2
v0.0.1
Add pgbouncer mode