stephenyeargin / hubot-grafana

📈🤖 Query Grafana dashboards
http://docs.grafana.org/tutorials/hubot_howto/
MIT License
154 stars 48 forks source link

Add S3 support for graphs #15

Closed stephenyeargin closed 9 years ago

stephenyeargin commented 9 years ago

Prior to this PR, a user would have to meet several requirements before the graphs would render on services such as Slack or HipChat. First, they would have to have a wide-open Grafana instance (no authentication). Second, it would have to be on the public internet (accessible from the hosted chat's servers).

This PR handles both of these instances by allowing the user to configure an S3 bucket and credentials. With those credentials, the script will download the image using authentication headers and upload the chart image to the defined S3 path. The script will then provide a link per usual, which will be rendered on the hosted chat service.

Special thanks to @rick, who I (mostly|poorly) ripped off this entire implementation from his hubot-graphme package. :grinning:

Fixes #5 /cc @torkelo @tenzer

torkelo commented 9 years ago

:+1:

Tenzer commented 9 years ago

I have added a few comments to this PR and made #16 which should be possible to merge into this one, which adds support for S3 buckets in order regions than the US.

stephenyeargin commented 9 years ago

Alright, I think that takes care of it.