Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



6 Commits

Repository files navigation

grafana-images Build Status Coverage Status

This program interacts with Grafana and hubot-grafana to provide facility to copy/save Grafana panel images to a location on disk. The idea is that this location is then shared by a web server so the images can be publically available. The rough system call diagram is as follows:

grafana-images http call diagram

The HTTP post expected by grafana-images should have two headers and a json payload:

"Accept: application/json"
"Authorization: Bearer grafana-token-goes-here"
  "imageUrl": ""

The returned json will have a url that can be used to publically access the Grafana panel image:

  "pubImg": ""

In addition to this application, it is assumed that you have a web server set up to serve the saved images at the url returned. All the necessary settings should be configurable:

$ grafana-images --help
Usage of grafana-images:
  -imageHost="": host for the saved images
  -imagePath="/opt/saved-images": location on disk where images will be saved
  -port=8080: grafana-images listening port

For more information on how this fits together have a look at ChatOps: Hubot Grafana Images in HipChat.


This will run tests as well.



make run

If you want to test the running system, you'll need to send it a json payload along with a couple of headers:

curl -d '{"imageUrl":""}' -H "Accept: application/json" -H "Authorization: Bearer 1234567543ewsfdgdh432345awdf=" http://localhost:8080/grafana-images

Test Coverage

make cover