镜像概览

完整引用
docker.io/prometheuscommunity/json-exporter
Registry
docker.io
命名空间
prometheuscommunity
仓库
json-exporter
已缓存 Tag 数
9
最近同步
07/06/2026, 10:56 AM

简介

Prometheus JSON Exporter 镜像,将 HTTP JSON API 指标转换为 Prometheus 格式,适合监控无原生 exporter 的 REST 服务。

详细介绍

prometheuscommunity/json-exporter 按 config 中 PromQL/JSONPath 规则抓取远程 HTTP 接口并暴露 /metrics。典型用于 SaaS 配额、业务 KPI 等只有 JSON API 的系统接入 Prometheus,与 blackbox_exporter 相比可解析响应体字段。定位为无状态 metrics exporter,需配置文件 volume;K8s 可 Deployment + ServiceMonitor 部署。

快速启动

docker run -d --name json-exporter \
  -p 7979:7979 \
  -v $(pwd)/config.yml:/config.yml:ro \
  docker.io/prometheuscommunity/json-exporter:latest

推荐实践

docker run -d --name json-exporter \
  --restart unless-stopped \
  -p 7979:7979 \
  -v /opt/json-exporter/config.yml:/config.yml:ro \
  docker.io/prometheuscommunity/json-exporter:v0.6.0

核心参数说明

  • -p 7979:7979 — Prometheus scrape /metrics 端口
  • -v .../config.yml:... — 模块与 JSONPath 规则
  • --restart unless-stopped — exporter 持续在线
  • 固定 tag — 与 Prometheus 版本 pin
  • 抓取 — Prometheus 配置 job 指向 :7979/probe

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: json-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: json-exporter
  template:
    metadata:
      labels:
        app: json-exporter
    spec:
      containers:
        - name: exporter
          image: docker.io/prometheuscommunity/json-exporter:v0.6.0
          ports:
            - containerPort: 7979
          volumeMounts:
            - name: config
              mountPath: /config.yml
              subPath: config.yml
      volumes:
        - name: config
          configMap:
            name: json-exporter-config
---
apiVersion: v1
kind: Service
metadata:
  name: json-exporter
spec:
  selector:
    app: json-exporter
  ports:
    - port: 7979
      targetPort: 7979

ServiceMonitor 自动发现;ConfigMap 热更新需 rolling restart。

最新 Tag(20 条)

查看全部 9 个 Tag →
Tag架构推送时间大小Digest同步期望操作
docker.io/prometheuscommunity/json-exporter
:master
linux/amd64linux/arm64linux/arm/v7linux/ppc64le
2026/07/03 23:0112.7 MBsha256:02983d88179e
docker.io/prometheuscommunity/json-exporter
:latest
linux/amd64linux/arm64/v8linux/arm/v7linux/ppc64le
2025/02/05 22:0112.4 MBsha256:700beeb82d9e
docker.io/prometheuscommunity/json-exporter
:v0.7.0
linux/ppc64lelinux/amd64linux/arm64/v8linux/arm/v7
2025/02/05 22:0012.2 MBsha256:2a6cfff26337
docker.io/prometheuscommunity/json-exporter
:v0.6.0
linux/arm64/v8linux/arm/v7linux/ppc64lelinux/amd64
2023/06/06 10:5310.5 MBsha256:4f63ff4db23c
docker.io/prometheuscommunity/json-exporter
:v0.5.0
linux/armlinux/ppc64lelinux/amd64linux/arm64
2022/07/11 16:049.8 MBsha256:806c2bee1d1f
docker.io/prometheuscommunity/json-exporter
:v0.4.0
linux/armlinux/arm64linux/amd64linux/ppc64le
2022/01/18 14:169.1 MBsha256:ccb14a87eb94
docker.io/prometheuscommunity/json-exporter
:v0.3.0
linux/arm64linux/armlinux/amd64linux/ppc64le
2021/02/14 10:329.5 MBsha256:5124326581a0
docker.io/prometheuscommunity/json-exporter
:v0.2.0
linux/amd64linux/arm64linux/ppc64lelinux/arm
2020/11/04 02:2010.6 MBsha256:ae2e7dfb0e72
docker.io/prometheuscommunity/json-exporter
:v0.1.0
linux/ppc64lelinux/armlinux/arm64linux/amd64
2020/07/27 18:309.7 MBsha256:e9da363602af