镜像概览

完整引用
docker.io/prometheuscommunity/postgres-exporter
Registry
docker.io
命名空间
prometheuscommunity
仓库
postgres-exporter
已缓存 Tag 数
23
最近同步
07/05/2026, 06:05 PM

简介

PostgreSQL Exporter 镜像,暴露 PG 连接/慢查询/复制延迟 Prometheus 指标,关系型数据库可观测性采集 Sidecar。

详细介绍

prometheuscommunity/postgres-exporter 连接 PostgreSQL 采集连接数、事务、复制延迟与表膨胀等指标,暴露 /metrics 端点。定位为 PG 监控指标采集服务,与 Prometheus/Grafana 配合;数据库容量规划、慢查询告警与主从复制健康监控。

快速启动

docker run -d --name pg-exporter \
  -p 9187:9187 \
  -e DATA_SOURCE_NAME=postgresql://user:pass@postgres:5432/db?sslmode=disable \
  docker.io/prometheuscommunity/postgres-exporter:latest

推荐实践

docker run -d --name pg-exporter \
  --restart unless-stopped \
  -p 9187:9187 \
  -e DATA_SOURCE_NAME=postgresql://exporter:changeme@postgres:5432/postgres?sslmode=disable \
  docker.io/prometheuscommunity/postgres-exporter:v0.15.0

核心参数说明

  • DATA_SOURCE_NAME — PG 连接串(高敏
  • -p 9187:9187 — Prometheus metrics
  • 账号 — 建议只读监控用户
  • 抓取 — Prometheus scrape 配置

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pg-exporter
  template:
    metadata:
      labels:
        app: pg-exporter
    spec:
      containers:
        - name: exporter
          image: docker.io/prometheuscommunity/postgres-exporter:v0.15.0
          ports:
            - containerPort: 9187
          envFrom:
            - secretRef:
                name: pg-exporter-dsn
---
apiVersion: v1
kind: Service
metadata:
  name: postgres-exporter
  annotations:
    prometheus.io/scrape: "true"
spec:
  selector:
    app: pg-exporter
  ports:
    - port: 9187
      targetPort: 9187

ServiceMonitor 或 Pod Sidecar;Grafana 大盘联动。

最新 Tag(20 条)

查看全部 23 个 Tag →
Tag架构推送时间大小Digest同步期望操作
docker.io/prometheuscommunity/postgres-exporter
:master
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/07/03 23:0111.2 MBsha256:4130d705c801
docker.io/prometheuscommunity/postgres-exporter
:v0
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/06/29 23:2611.2 MBsha256:69233662a53d
docker.io/prometheuscommunity/postgres-exporter
:latest
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/06/29 23:2611.2 MBsha256:69233662a53d
docker.io/prometheuscommunity/postgres-exporter
:v0.20.0
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/06/29 23:2611.2 MBsha256:69233662a53d
docker.io/prometheuscommunity/postgres-exporter
:v0.19.1
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/02/25 21:1411.0 MBsha256:a0c79a8210d1
docker.io/prometheuscommunity/postgres-exporter
:v0.19.0
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/02/05 02:0111.0 MBsha256:2c3e96e053a3
docker.io/prometheuscommunity/postgres-exporter
:v0.18.1
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2025/09/30 01:1911.1 MBsha256:5c35b3243652
docker.io/prometheuscommunity/postgres-exporter
:v0.18.0
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2025/09/26 03:4811.1 MBsha256:191e6099a809
docker.io/prometheuscommunity/postgres-exporter
:v0.17.1
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2025/02/26 21:5610.7 MBsha256:9fca39a43070
docker.io/prometheuscommunity/postgres-exporter
:v0.17.0
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2025/02/22 09:5410.7 MBsha256:170643ebfcc3
docker.io/prometheuscommunity/postgres-exporter
:v0.16.0
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2024/11/11 05:1210.6 MBsha256:fe38515ba4d0
docker.io/prometheuscommunity/postgres-exporter
:v0.15.0
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2023/10/27 22:429.6 MBsha256:31bdf4109106
docker.io/prometheuscommunity/postgres-exporter
:v0.14.0
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2023/09/20 09:479.5 MBsha256:2b0a39d1a4c5
docker.io/prometheuscommunity/postgres-exporter
:v0.13.2
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2023/07/24 08:129.5 MBsha256:421c1568f326
docker.io/prometheuscommunity/postgres-exporter
:v0.13.1
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2023/06/27 19:209.6 MBsha256:0798230747f6
docker.io/prometheuscommunity/postgres-exporter
:v0.13.0
linux/arm/v7linux/amd64linux/arm64/v8linux/ppc64le
2023/06/22 15:119.1 MBsha256:5888a86972c7
docker.io/prometheuscommunity/postgres-exporter
:v0.12.1
linux/amd64linux/arm64/v8linux/ppc64lelinux/arm/v7
2023/06/14 00:239.5 MBsha256:0524c6ee50ec
docker.io/prometheuscommunity/postgres-exporter
:v0.12.0
linux/armlinux/amd64linux/ppc64lelinux/arm64
2023/03/22 08:008.9 MBsha256:f0927af93825
docker.io/prometheuscommunity/postgres-exporter
:v0.12.0-rc.0
linux/ppc64lelinux/armlinux/arm64linux/amd64
2022/08/29 23:4610.1 MBsha256:ec4a057a919d
docker.io/prometheuscommunity/postgres-exporter
:v0.11.1
linux/arm64linux/amd64linux/armlinux/ppc64le
2022/08/19 05:038.3 MBsha256:7347a95ce44e