Closed torkelo closed 9 years ago
Interesting. I can see this working a few different ways, but I'm not certain the best approach -- i have not come across many Hubot script packages that do this, but a simple search shows:
I can look into these to see how to go about it.
Wouldn't it also be possible for Hubot to download the rendered graph and post is as a picture to the chat system? You can at least post pictures in Hipchat, I would assume Slack allows the same.
@Tenzer: I think that would be a possible approach, but it could leave our IRC adapter users out in the cold. Do you know of a hubot package that leverages the platform file upload API?
/cc @technicalpickles
@stephenyeargin: Looking throught both the hubot-hipchat adapter and Hubot documentation, I don't think it's possible to post files by default. It would instead require this plugin to detect which adapter is being used, and then implement the image posting logic for each of them, which may be too much work...
Here's a couple of other related Hubot plugins which also store the images on S3:
Heh. That script by @rick looks familiar. Was just talking to him about it a couple of weeks ago.
Feel free to use anything there that's useful. :bow:
This issue (https://github.com/rick/hubot-graphme/issues/1) documents the list of things I want to do to consider that graphme adapter ready for general consumption. The S3 uploading generally works but there's a naming bug and some things I want to improve about it.
To make this work with all clients of Hipchat and Slack the image needs to be publicly accessible, most Grafana installs will be behind firewalls/dmz so the best option is to upload the image to an s3 bucket and link to that.