Export Grafana Dashboard as PDF

Sushruthan
1 min readJul 9, 2021

--

Overview:

In this post we will export Grafana dashboard as pdf using Grafana Reporter Service.

Step 1: Install Grafana Reporter

Execute the command given below to install Grafana Reporter and its requirements. To build the Grafana Reporter Golang should be installed and be available in path. Read the blog below to setup Golang.

Commands to run (with Golang available in Path)

The following commands gets the source files and dependencies, Builds and installs grafana-reporter.

$ sudo apt install texlive-latex-base$ go get github.com/IzakMarais/reporter/…$ go install -v github.com/IzakMarais/reporter/cmd/grafana-reporter or $ go install github.com/IzakMarais/reporter/cmd/grafana-reporter@latest

Step 2: Convert Dashboard to PDF

Grafana Instance must be running for the Reporter Service to connect to obtain the PDF. To run the Reporter service run the command given below.

$ grafana-reporter

The reporter displays the pdf on a specified port(localhost:8686), the query should be made in the following format.

/api/v5/report/{dashboardUID}?apitoken=12345##Example
http://localhost:8686/api/v5/report/gdS9xqqMz?apitoken=xxxxxxxxxxxx

To add it as a button and for other Reference view the link below:

https://github.com/IzakMarais/reporter

--

--

Sushruthan
Sushruthan

Written by Sushruthan

Interested in technology, aspiring programmer

No responses yet