Configuring Chronograf alert endpoints

Warning! This page documents an old version of Chronograf, which is no longer actively developed. Chronograf v1.7 is the most recent stable version of Chronograf.

Chronograf alert endpoints can be configured using the Chronograf user interface to create Kapacitor-based event handlers that send alert messages.
You can use Chronograf to send alert messages to specific URLs as well as to applications.

Note that the configuration options in the Configure alert endpoints section are not all-inclusive.
Some event handlers allow users to customize event handler configurations per alert rule.
For example, Chronograf’s Slack integration allows users to specify a default channel in the Configure alert endpoints section and a different channel for individual alert rules.

HipChat

HipChat is an Atlassian web service for group chat, video chat, and screen sharing.
Configure Chronograf to send alert messages to a HipChat room.
The sections below describe each configuration option.

Subdomain

The HipChat subdomain name.
Identify the subdomain in your HipChat URL;
for example, the subdomain in the Hipchat URL https://example-hi.hipchat.com/home is example-hi.

Room

The HipChat room name.
Chronograf sends alert messages to this room.

Token

A HipChat API access token for sending notifications.
The following steps describe how to create the API access token:

From the HipChat home page (https://<your-subdomain>.hipchat.com/home), access Account settings by clicking on the person icon in the top right corner.

Select API access from the items in the left menu sidebar.

Under Create new token, enter a label for your token (it can be anything).

Under Create new token, select Send Notification as the Scope.

Click Create.

Your token appears in the table just above the Create new token section:

Kafka

To configure a Kafka alert endpoint:

In the Configure Alert Endpoints of the Configure Kapacitor Connection page, click the Kafka tab.

Enter the following:

ID: Unique identifier for a Kafka cluster. Default is localhost.

Brokers: List of Kafka broker addresses, using the host:port format.

Timeout: The maximum amount of time to wait before flushing an incomplete batch. Default is 10s.

Batch Size: Number of messages batched before sending to Kafka. Default is 100.

Batch Timeout: Timeout period for the batch. Default is 1s.

Use SSL: Check to enable SSL communication.

SSL CA: Path to the SSL CA (certificate authority) file.

SSL Cert: Path to the SSL host certificate.

SSL Key: Path to the SSL certificate private key file.

Insecure Skip Verify: Check to use SSL, but skip chain and host verification. Required if using a self-signed certificate.

In the Slack Webhook URL field, enter the Slack WebHook URL that is listed as Webhook URL on the Incoming Webhooks page.

Slack Channel (optional)

Chronograf sends alert messages to the specified Slack channel, or DM (direct message).
Prefix the Slack channel with #, or the DM (direct message) with @. For example, #chronocats is a channel and @chronothan is a DM.

If this field is empty (not specified), Chronograf sends alert messages to the channel or DM selected for the Slack WebHook URL or to the channel or DM specified in the alert rule.
The channel or DM specified in the alert rule takes precedence over both the Slack Channel configuration option and the WebHook URL configuration.

Configuration Enabled

Check the Configuration Enabled checkbox to enable this configuration.

Save Changes

Click Save Changes to save the Slack configuration.

Send Test Alert

Click Send Test Alert to test your alert endpoint configuration.

Add Another Config

Click Add Another Config to add additional Slack alert endpoints. Each additional Slack alert endpoints requires you to specify a unique identifier in the Nickname this Configuration field that becomes enabled after the initial Slack alert endpoint is configured.

Telegram

Telegram is a popular messaging app.
Configure Chronograf to send alert messages to an existing Telegram bot.
The sections below describe each configuration option.

Telegram bot

Chronograf sends alerts to an existing Telegram bot.
The following steps describe how to create a new Telegram bot:

Search for the @BotFather username in your Telegram application

Click Start to begin a conversation with @BotFather

Send /newbot to @BotFather

@BotFather responds:

Alright, a new bot. How are we going to call it? Please choose a name for your bot.

@BotFather will prompt you through the rest of the bot-creation process;
feel free to follow his directions or continue with our version of the steps below.
Both setups result in success!

Send your bot’s name to @BotFather

Your bot name can be anything.
Note that this is not your bot’s Telegram @username;
you’ll create the username in step 5.

@BotFather responds:

Good. Now let's choose a username for your bot. It must end in `bot`. Like this, for example: TetrisBot or tetris_bot.

Send your bot’s username to @BotFather

Your bot’s username must end in bot.
For example: mushroomKap_bot.

BotFather responds:

Done! Congratulations on your new bot. You will find it at t.me/<bot-username>. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API:
`<API-access-token>`
For a description of the Bot API, see this page: https://core.telegram.org/bots/api

Begin a conversation with your bot

Click on the t.me/<bot-username> link in @BotFather’s response
and click Start at the bottom of your Telegram application.

Your newly-created bot will appear in the chat list on the left side of the application.

Token

The Telegram API access token.
The following section describes how to identify or create the API access token.

Telegram’s @BotFather bot sent you an API access token when you created your bot.
See the @BotFather response in step 5 of the previous section for where to find your token.

If you can’t find the API access token, create a new token with the steps
below:

Send /token to @BotFather

Select the relevant bot at the bottom of your Telegram application

@BotFather responds with a new API access token:

You can use this token to access HTTP API:
<API-access-token>
For a description of the Bot API, see this page: https://core.telegram.org/bots/api

Chat ID

The Telegram chat ID.
The following steps describe how to identify your chat ID:

Paste the following link in your browser.
Replace <API-access-token> with the API access token that you identified or created in the previous section:

https://api.telegram.org/bot<API-access-token>/getUpdates?offset=0

Send a message to your bot.

Send a message to your bot in the Telegram application.
The message text can be anything; your chat history must include at least one message to get your chat ID.

Refresh your browser.

Identify the chat ID.

Identify the numerical chat ID in the browser.
In the example below, the chat ID is 123456789.