grafana_logo

How to integrate Grafana with Slack

How to integrate Grafana with Slack

Set up a custom app to get Grafana notifications in the channel of your choice

Unlike a lot of other tools, Grafana doesn’t have an out-of-the-box Slack integration that you can connect through the Slack app directory. But Grafana does have a built-in Slack alert type, and Slack makes it very simple to set up a custom app in your workspace to receive those alerts. It’s not as easy as search, install, go—but with these straightforward steps, you’ll have Grafana alerts set up in Slack in no time.

What you’ll need

  • An active Slack workspace

  • Admin or Editor level permissions in your Grafana organization

Create a custom Slack app for your workspace

This can seem like a daunting task, but it’s actually pretty simple, and it requires minimal configuration to connect to Grafana.

As part of app setup you’ll be asked to select a slack channel to associate with the app. If you would like your Grafana alerts to go to a new channel, create that before proceeding.

  1. Go to https://api.slack.com/apps and click Create an App.

  2. In the Create an app modal, choose From scratch.

  3. Name your app and select your workspace. Click Create App.

  4. Select the Incoming Webhooks option from the Add features and functionality menu.

  5. Toggle on webhooks.

  6. Click Add New Webhook to Workspace at the bottom of the Webhook URLs for your Workspace section.

  7. Select the Slack channel you would like to connect the app to and click Allow.

  8. 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’re ready to paste the link. Either way, keep this window open for the next step so you can come back to it if you need to.

Create a Slack alert in Grafana

  1. Now that we have the Slack app configured and ready to receive alerts from Grafana, all that’s left to do is create the alert from your Grafana dashboard.

  2. Click the bell icon (Alerting) in the grafana side menu and select Notification channels.

  3. Click Add channel.

  4. Give your notification channel a Name and select Slack from the Type dropdown. Under Slack settings, paste the webhook URL provided by Slack during your app setup.

  5. Configure any optional settings that fit your use case.

  6. Click Save.

  7. Optional, but a good best practice, click Send Test to test the integration. You should receive an example alert notification in your designated Slack channel.

Get started for free

Say hello to your new sidekick