--- page_title: How To integrate Hubot and Grafana page_description: Hubot Grafana install guide page_keywords: grafana, tutorials, hubot, slack, hipchat, setup, install, config author: Torkel Ödegaard --- # How to integrate Hubot with Grafana Grafana 2.0 shipped with a great feature that enables it to render any graph or panel to a PNG image. No matter what data source you are using, the PNG image of the Graph will look the same as it does in your browser. This guide will show you how to install and configure the [Hubot-Grafana](https://github.com/stephenyeargin/hubot-grafana) plugin. This plugin allows you to tell hubot to render any dashboard or graph right from a channel in Slack, Hipchat or Basecamp. The bot will respond with an image of the graph and a link that will take you to the graph. > *Amazon S3 Required*: The hubot-grafana script will upload the rendered graphs to Amazon S3. This > is so Hipchat and Slack can show them reliably (they require the image to be publicly available).
You need to set the environment variable `HUBOT_GRAFANA_API_KEY` to a Grafana API Key.
You can add these from the API Keys page which you find in the Organization dropdown.
### Amazon S3
The `S3` options are optional but for the images to work properly in services like Slack and Hipchat they need
to publicly available. By specifying the `S3` options the hubot-grafana script will publish the rendered
panel to `S3` and it will use that URL when it posts to Slack or Hipchat.
## Hubot commands
- `hubot graf list`
- Lists the available dashboards
- `hubot graf db graphite-carbon-metrics`
- Graph all panels in the dashboard
- `hubot graf db graphite-carbon-metrics:3`
- Graph only panel with id 3 of a particular dashboard
- `hubot graf db graphite-carbon-metrics:cpu`
- Graph only the panels containing "cpu" (case insensitive) in the title
- `hubot graf db graphite-carbon-metrics now-12hr`
- Get a dashboard with a window of 12 hours ago to now
- `hubot graf db graphite-carbon-metrics now-24hr now-12hr`
- Get a dashboard with a window of 24 hours ago to 12 hours ago
- `hubot graf db graphite-carbon-metrics:3 now-8d now-1d`
- Get only the third panel of a particular dashboard with a window of 8 days ago to yesterday
- `hubot graf db graphite-carbon-metrics host=carbon-a`
- Get a templated dashboard with the `$host` parameter set to `carbon-a`
## Aliases
Some of the hubot commands above can lengthy and you might have to remember the dashboard slug (url id).
If you have a few favorite graphs you want to be able check up on often (let's say from your mobile) you
can create hubot command aliases with the hubot script `hubot-alias`.
Install it:
npm i --save hubot-alias
Now add `hubot-alias` to the list of plugins in `external-scripts.json` and restart hubot.
Now you can add an alias like this:
- `hubot alias graf-lb=graf db loadbalancers:2 now-20m`