Renders Prometheus queries as PNG images
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd
.gitignore
Dockerfile
README.md
go.mod
go.sum
renderer.go

README.md

prometheus-renderer

Renders Prometheus queries as PNG images

Usage

Commands are located in cmd/

render

render is a CLI to render a query as png image.

Usage of render
  -f string
      Path to output file (default "out.png")
  -h int
      Height (default 600)
  -s duration
      Graph range (default 1h0m0s)
  -u string
      URL of prometheus server (default "http://localhost:9090")
  -w int
      Width (default 800)

renderd

renderd is a HTTP server returning an png image for a query.

Usage of renderd
  -l string
      Address to listen on (default ":8080")
  -r string
      Root path for HTTP endpoints; Use when behind proxy
  -t string
      Auth token to require for access
  -u string
      URL of prometheus server (default "http://localhost:9090")

HTTP API

The /graph GET endpoint takes the following arguments and returns an PNG image:

  • q: Prometheus query (mandatory)
  • h: Height (360)
  • w: Width (360)
  • s: Graph range in seconds (3600)
  • t: Auth token, must match -t flag ()