Ever since they began using Grafana Dashboards in the NetEye monitoring system, my customers have asked again and again whether they can create PDF files of what they see on their Grafana Dashboards.
This request must be understood clearly.
The use of Grafana dashboards by IT staff is very popular, for reasons such as its modern presentation format, the ability to query information accurately without having to resort to averages, etc.
However, IT managers need to receive information in a common, shareable data format such as PDF, which can be easily incorporated into reports, statistics and evaluations.
Unfortunately, until recently exporting Grafana Dashboards to a PDF file was not possible, and so IT administrators had to fulfill these requests in various roundabout ways.
Some time ago I had this customer request again and again, so I tried to find a solution.
I came across the Grafana blog “https://www.bujarra.com/generando-informes-con-grafana-y-programar-su-envio/?lang=en” which describes how to create PDF documents from Grafana Dashboards.
Of course, I immediately started to implement the description from this blog.
The description in that blog is very clear and simple, and finally I was able to achieve my long-awaited goal: PDF export from Grafana Dashboards.
I don’t want to reproduce the blog in detail, but rather to point out some necessary features that it’s missing.
First of all, the “grafana-reporter” service must always be running, otherwise no PDF files can be exported.
A second point that is not explained in the blog is that you have to insert an API Token in the URL on LINK creation.
Thus, an API token must be created in Grafana at “Configuration -> API keys”. When creating this Token, a name and a role must be selected (the VIEWER role is sufficient).
Then you’ll receive a long token, which must be added to the URL in the Grafana Dashboard LINKS settings.
The specified URL in the LINK setting must look like this:
http://{FQDN neteye server}:8686/api/v5/report/{dashboardUID}?apitoken={tokenid}
For me, the implementation worked immediately and I was finally able to export the Grafana Dashboards to a PDF file.