TL;DR InfluxDB Tech Tips - How to Set Up Kapacitor and Chronograf to Send Alert Messages to HipChat
By Regan Kuchan / Feb 23, 2017 / Chronograf, Kapacitor, Tech Tips
In this post we describe how to set up Chronograf and Kapacitor to send alert messages to HipChat. Check in next week for the most interesting InfluxDB and TICK-stack related issues, workarounds, how-tos and Q&A from GitHub, IRC and the InfluxDB Google Group that you might have missed.
HipChat Setup with Kapacitor
HipChat is Atlassian’s web service for group chat, video chat, and screen sharing. Kapacitor is InfluxData’s open source data processing framework that allows you to configure and send alert messages to event handlers (like HipChat!).
To send Kapacitor alert messages to HipChat, you need your:
HipChat subdomain name
Identify your subdomain name in the HipChat URL:
HipChat room name
In the web application, create a new room or identify the target room under the
ROOM section in the left-hand sidebar.
HipChat API access token for sending notifications
The following steps describe how to create the API access token.
1. From the HipChat home page (
Account settings by clicking on the person icon in the top right corner.
API access from the items in the left menu sidebar.
Create new token, enter a label for your token (it can be anything).
Create new token, select
Send Notification as the scope.
Create. Your token appears in the table just above the
Create new token section.
[hipchat] section of Kapacitor’s configuration file (
/etc/kapacitor/kapacitor.conf), set the
enabled setting to
true and set
subdomain in the
url setting to your HipChat subdomain. There are other configuration settings, but they are optional.
Sample configuration file:
[hipchat] enabled = true url = "https://<your-subdomain>.hipchat.com/v2/room"
|alert() section of your Kapacitor TICKscript, include the
.hipChat() attribute, set the
.room('<your-hipchat-room>') attribute to your HipChat room, and set the
.token('<your-hipchat-room>') to your API access token.
stream |from() .measurement('cpu') |alert() .crit(lambda: "usage_idle" < 10) .message('') .hipChat() ? .room('<your-hipchat-room>') ? .token('<your-api-access-token>') ?
Next, define and enable your Kapacitor task, and keep an eye on your HipChat room. That’s it!
HipChat Setup with Chronograf
- subdomain name
- room name
- API access token
See the list of requirements in the HipChat Setup with Kapacitor section for how to get that information from HipChat.
1. Visit the Kapacitor Configuration page in your Chronograf application.
2. In the
Configure Alert Endpoints section, select
HipChat from the dropdown menu.
subdomain in the
HipChat URL input to your HipChat subdomain.
4. Enter your HipChat room in the
5. Enter your HipChat API access token in the
6. Click the
When creating or editing a rule on Chronograf’s Kapacitor Rules page, select
hipchat in the dropdown menu at the bottom of your screen. Kapacitor sends all alert messages associated with that rule to your configured HipChat room.
- Downloads for the TICK-stack are live on our "downloads" page.
- Deploy on the Cloud: Get started with a FREE trial of InfluxDB Cloud featuring fully-managed clusters, Kapacitor and Grafana.
- Deploy on Your Servers: Want to run InfluxDB clusters on your servers? Try a FREE 14-day trial of InfluxDB Enterprise featuring an intuitive UI for deploying, monitoring and rebalancing clusters, plus managing backups and restores.
- Tell Your Story: Over 300 companies have shared their story on how InfluxDB is helping them succeed. Submit your testimonial and get a limited edition hoodie as a thank you.