Export Grafana dashboard as PNG (and get your daily dashboard via email!)

Cet article a été publié le 22/05/2017
Les informations ou les techniques décrites peuvent être obsolètes.

Since Grafana 4.1, it is possible to render a whole dashboard as PNG (thanks to issue #2085).

It’s easy to retrieve a dashboard image with curl and send it via email :

curl -H "Authorization: Bearer eyJrIjoiMGFCaHRzMVkwVOVwMnZoTmxYN00xQjJxajF0N1NMemoiLCJuIjoiRXhwb3J0IiwiaWQiOjF9" "https://grafana.yoursite.com/render/dashboard/db/telegraf-metrics?width=1800&from=now-48h&to=now" > dashboard.png

echo "Here is your daily Grafana snapshot" | mutt -s "Daily Grafana" -a dashboard.png -- your@email.com

Of course, you need to customize this example to your needs and setup a cron job to get your daily email 🙂

Retour haut de page