1. Images & Charts
  2. prometheus-json-exporter
prometheus-json-exporter

prometheus-json-exporter

Infra
Updated on July 31

Prometheus JSON Exporter Overview

Secure your stack with a hardened Prometheus JSON Exporter image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.


Prometheus JSON Exporter can be used to monitor any HTTP service that returns JSON without writing a custom exporter. It scrapes remote JSON APIs and exposes the extracted values as Prometheus metrics.


Try It Out

The JSON Exporter needs a config file that defines which JSONPath expressions to scrape from a target's JSON response. Create a config.yml that extracts the star count from a GitHub repository:

cat <<EOF > config.yml
modules:
  default:
    metrics:
    - name: github_repo_stargazers
      path: "{ .stargazers_count }"
      help: Number of stars for the target GitHub repository
EOF

Start the exporter with the config file mounted:

docker run -d --rm \
  -p 7979:7979 \
  -v "$PWD/config.yml:/config.yml" \
  reg.mini.dev/prometheus-json-exporter --config.file=/config.yml

Probe a public JSON endpoint using the default module:

curl "http://localhost:7979/probe?module=default&target=https://api.github.com/repos/prometheus/prometheus"

The response is in Prometheus exposition format:

github_repo_stargazers 65174

Technical Considerations

The Prometheus JSON Exporter image provided by Minimus is a slim, security-hardened alternative to the public image. The images are largely interchangeable, with a few differences as noted below.

Prometheus JSON Exporter built by Minimus:

  1. Runs as non-root by default, consistent with the public image.
  2. Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.