|
| 1 | +--- |
| 2 | +meta: |
| 3 | + title: How to configure Slack for Grafana alerting using a Webhook URL |
| 4 | + description: Learn how to send your Grafana alert notifications to your Slack channels for more efficient monitoring. |
| 5 | +content: |
| 6 | + h1: How to configure Slack for Grafana alerting using a Webhook URL |
| 7 | + paragraph: Learn how to send your Grafana alert notifications to your Slack channels for more efficient monitoring. |
| 8 | +categories: |
| 9 | + - observability |
| 10 | +dates: |
| 11 | + validation: 2025-02-10 |
| 12 | + posted: 2025-02-10 |
| 13 | +--- |
| 14 | + |
| 15 | +This page shows you how to use the Slack `Incoming Webhooks` feature to send your Grafana alert notifications to a Slack channel. |
| 16 | + |
| 17 | +<Macro id="requirements" /> |
| 18 | + |
| 19 | + - A Scaleway account logged into the [console](https://console.scaleway.com) |
| 20 | + - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 21 | + - [Created](/cockpit/how-to/create-external-data-sources/) data sources |
| 22 | + - [Enabled](/cockpit/how-to/enable-alert-manager/) the alert manager |
| 23 | + - [Retrieved](/cockpit/how-to/retrieve-grafana-credentials/) your Grafana credentials |
| 24 | + - [Configured](/cockpit/how-to/configure-alerts-for-scw-resources/) Grafana alerts for your resources |
| 25 | + - Created a Slack workspace in which you want to receive the alert notifications |
| 26 | + |
| 27 | +## How to create a Slack app |
| 28 | + |
| 29 | +1. Refer to the [Slack documentation](https://api.slack.com/messaging/webhooks#create-app) and click **Create your Slack app**. You are redirected to a new page and a pop-up appears prompting you to either create your app **from a manifest** or **from scratch**. |
| 30 | +2. Click **From scratch**. |
| 31 | +3. Enter a name for your app. For the purpose of this documentation, we are naming the app `Grafana alerts`. |
| 32 | +4. Pick the workspace you want to receive alerts in from the drop-down. |
| 33 | +5. Click **Create App** to confirm. You app's **Basic information** page displays. |
| 34 | +6. Optionally, scroll down to **Display information** to customize the way your app will display in Slack. For example, you can: |
| 35 | + - Add a short description in the **Short description** field. |
| 36 | + - Add an icon |
| 37 | + - Choose a background color |
| 38 | + - Add a long description |
| 39 | +7. Click **Save Changes** Once you are done configuring your app. |
| 40 | + |
| 41 | +## How to activate incoming webhooks |
| 42 | + |
| 43 | +1. Click **Incoming Webhooks** under the **Features** section. |
| 44 | +2. Click the toggle icon to activate incoming webhooks. The **Webhook URLs for Your Workspace** section displays. |
| 45 | +3. Click **Add New Webhook to Workspace**. You are prompted to choose a Slack channel in which your Grafana alerts app will post. |
| 46 | +4. Click the drop-down and select one or all Slack channels. |
| 47 | +5. Click **Allow**. |
| 48 | +6. Click **Copy** under the **Webhook URL** section, as you will need it in the next steps. |
| 49 | + |
| 50 | +## How to create your Slack integration in Grafana |
| 51 | + |
| 52 | +### With the Scaleway Alerting alert manager |
| 53 | + |
| 54 | +1. [Access](/cockpit/how-to/access-grafana-and-managed-dashboards/) your Grafana dashboard. |
| 55 | +2. Click the **Toggle menu** icon next to **Home** in the top left corner of your screen. |
| 56 | +3. Click **Alerting**, then click **Contact points**. |
| 57 | +4. Choose the **Scaleway Alerting** alert manager in the drop-down next to the **Choose Alertmanager** field. |
| 58 | +5. Click **+ Add contact point**. |
| 59 | +6. Enter a contact point name. |
| 60 | +7. Select **Slack** from the **Integration** drop-down. |
| 61 | +8. In the **Channel** field, paste the name of the Slack channel or user to send notifications to. |
| 62 | +9. Click **Optional Slack settings** and paste your Slack app Webhook URL in the **Webhook URL** field. |
| 63 | +10. Click **Save contact point**. |
| 64 | + |
| 65 | +### With the Grafana alert manager |
| 66 | + |
| 67 | +1. [Access](/cockpit/how-to/access-grafana-and-managed-dashboards/) your Grafana dashboard. |
| 68 | +2. Click the **Toggle menu** icon next to **Home** in the top left corner of your screen. |
| 69 | +3. Click **Alerting**, then click **Contact points**. |
| 70 | +4. Choose the **Grafana** alert managet in the drop-down next to the **Choose Alertmanager** field. |
| 71 | +5. Click **+ Add contact point**. |
| 72 | +6. Enter a contact point name. |
| 73 | +7. Select **Slack** from the **Integration** drop-down. |
| 74 | +8. In the **Recipient** field, paste the name of the Slack channel or recipient to send notifications to. |
| 75 | +9. Paste your Slack app Webhook URL in the **Webhook URL** field. |
| 76 | +10. Optionally, configure your contact point as you wish with more customization. |
| 77 | +11. Optionally, click **Test** to send a test notification to the recipient you have configured in step 8. |
| 78 | + <Lightbox src="scaleway-slack-alert-test.webp" alt="Grafana test alert notification on Slack" /> |
| 79 | +12. Click **Save contact point**. |
0 commit comments