Skip to content

JaySeek/grafpng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grafpng

A simple http service that generates a *.png image from Grafana dashboards.

Requirements

Build requirements:

Getting started

Generate a dashboard report

Endpoint

The reporter serves a png report on the specified port at:

/api/v5/report/{dashboardUID}

where {dashboardUID} is the dashboard uid as used in the Grafana dashboard's URL. E.g. SoT6hL6zk from http://grafana-host:3000/d/SoT6hL6zk/descriptive-name. For more about this uid, see the Grafana HTTP API.

Query parameters

The endpoint supports the following optional query parameters. These can be combined using standard URL query parameter syntax, eg:

/api/v5/report/{dashboardUID}?apitoken=12345&var-host=devbox

Time span: The time span query parameter syntax is the same as used by Grafana. When you create a link from Grafana, you can enable the Time range forwarding check-box. The link will render a dashboard with your current time range.

variables: The template variable query parameter syntax is the same as used by Grafana. When you create a link from Grafana, you can enable the Variable values forwarding check-box. The link will render a dashboard with your current variable values.

apitoken: A Grafana authentication api token. Use this if you have auth enabled on Grafana. Syntax: apitoken={your-tokenstring}.

About

Service that exports a Grafana dashboard as png image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%