Integrate Slack and Elasticsearch Kibana
Set up a custom app to get Kibana notifications in the channel of your choice
While he Kibana Elasticsearch UI doesn’t have a pre-built Slack integration it can use Slack’s API and custom apps feature to generate webhooks you can use to steam alerts directly to your Slack workspace.
What you’ll need
- An active Slack workspace
- A Kibana UI
Create a custom Slack app for your workspace
This can seem like a daunting task, but it is actually very simple, and requires minimal configuration for connecting to Kibana.
Note: As part of app setup you’ll be asked to select a Slack channel to associate with the app. If you would like your Kibana alerts to go to a new channel, create it before proceeding.
Go to https://api.slack.com/apps and click Create an App
In the Create an app modal, choose From scratch.
Name your app and select your workspace. Click Create App.
Select the Incoming Webhooks option from the Add features and functionality menu.
Toggle on webhooks.
Click Add New Webhook to Workspace at the bottom of the Webhook URLs for your Workspace section.
Select the Slack channel you would like to connect the app to and click Allow.
The page will refresh and you will see a webhook URL in the Webhook URLs for your Workspace section. You can click Copy now or wait until you are ready to paste the link. Regardless, keep this window open for the next step so you can come back to it if you need to.
Define the Slack Connector in Kibana
Click the hamburger menu and scroll to the bottom. Click Stack Management.
Click Rules and Connectors.
Click the Connectors tab and choose the Slack Connector.
Name the connector and paste the webhook URL from Slack into the Webhook URL field.
Test the Connection
In the Kibana’s Slack connector Edit Connector modal, click the Test tab.
Write a test message in the message field and click Run. Note: Kibana connectors are plain text only. They do not support images or formatting.
Confirm your test message appears in Slack.