You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/configure-slack-grafana-alerting/index.mdx
+37-11Lines changed: 37 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
2
meta:
3
-
title: How to configure Slack for Grafana alerting using a Webhook URL
3
+
title: Configuring Slack for Grafana alerting using a Webhook URL
4
4
description: Learn how to send your Grafana alert notifications to your Slack channels for more efficient monitoring.
5
5
content:
6
-
h1: How to configure Slack for Grafana alerting using a Webhook URL
6
+
h1: Configuring Slack for Grafana alerting using a Webhook URL
7
7
paragraph: Learn how to send your Grafana alert notifications to your Slack channels for more efficient monitoring.
8
8
categories:
9
9
- observability
10
10
dates:
11
-
validation: 2025-02-10
12
-
posted: 2025-02-10
11
+
validation: 2025-02-11
12
+
posted: 2025-02-11
13
13
---
14
14
15
-
This page shows you how to use the Slack `Incoming Webhooks` feature to send your Grafana alert notifications to a Slack channel.
15
+
This page shows you how to create a Slack app, create a Slack webhook, create your Slack integration in Grafana using the Scaleway Alerting and the Grafana alert managers, and how to configure notification policies to receive your Grafana alert notifications to your Slack channel.
16
16
17
17
<Macroid="requirements" />
18
18
@@ -24,7 +24,7 @@ This page shows you how to use the Slack `Incoming Webhooks` feature to send you
24
24
-[Configured](/cockpit/how-to/configure-alerts-for-scw-resources/) Grafana alerts for your resources
25
25
- Created a Slack workspace in which you want to receive the alert notifications
26
26
27
-
## How to create a Slack app
27
+
## Creating a Slack app
28
28
29
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
30
2. Click **From scratch**.
@@ -38,7 +38,7 @@ This page shows you how to use the Slack `Incoming Webhooks` feature to send you
38
38
- Add a long description
39
39
7. Click **Save Changes** Once you are done configuring your app.
40
40
41
-
## How to activate incoming webhooks
41
+
## Activating incoming Webhooks
42
42
43
43
1. Click **Incoming Webhooks** under the **Features** section.
44
44
2. Click the toggle icon to activate incoming webhooks. The **Webhook URLs for Your Workspace** section displays.
@@ -47,22 +47,26 @@ This page shows you how to use the Slack `Incoming Webhooks` feature to send you
47
47
5. Click **Allow**.
48
48
6. Click **Copy** under the **Webhook URL** section, as you will need it in the next steps.
49
49
50
-
## How to create your Slack integration in Grafana
50
+
## Creating your Slack integration in Grafana
51
51
52
-
### With the Scaleway Alerting alert manager
52
+
### Using the Scaleway Alerting alert manager
53
53
54
54
1.[Access](/cockpit/how-to/access-grafana-and-managed-dashboards/) your Grafana dashboard.
55
55
2. Click the **Toggle menu** icon next to **Home** in the top left corner of your screen.
56
56
3. Click **Alerting**, then click **Contact points**.
57
57
4. Choose the **Scaleway Alerting** alert manager in the drop-down next to the **Choose Alertmanager** field.
58
58
5. Click **+ Add contact point**.
59
-
6. Enter a contact point name.
59
+
6. Enter a contact point name. For example, `Slack alerts`.
60
60
7. Select **Slack** from the **Integration** drop-down.
61
61
8. In the **Channel** field, paste the name of the Slack channel or user to send notifications to.
62
62
9. Click **Optional Slack settings** and paste your Slack app Webhook URL in the **Webhook URL** field.
63
63
10. Click **Save contact point**.
64
64
65
-
### With the Grafana alert manager
65
+
<Messagetype="important">
66
+
If you have already created contact points, you need to [configure a nested notification policy](#configuring-a-notification-policy) to define which contact point should receive which alert.
67
+
</Message>
68
+
69
+
### Using the Grafana alert manager
66
70
67
71
1.[Access](/cockpit/how-to/access-grafana-and-managed-dashboards/) your Grafana dashboard.
68
72
2. Click the **Toggle menu** icon next to **Home** in the top left corner of your screen.
@@ -77,3 +81,25 @@ This page shows you how to use the Slack `Incoming Webhooks` feature to send you
77
81
11. Optionally, click **Test** to send a test notification to the recipient you have configured in step 8.
78
82
<Lightboxsrc="scaleway-slack-alert-test.webp"alt="Grafana test alert notification on Slack" />
79
83
12. Click **Save contact point**.
84
+
85
+
<Messagetype="important">
86
+
If you have already created contact points, you need to [configure a nested notification policy](#configuring-a-notification-policy) to define which contact point should receive which alert.
87
+
</Message>
88
+
89
+
## Configuring a notification policy
90
+
91
+
If you have created multiple contact points in Grafana, the default contact point will receive alerts by default. To make sure your alerts are sent to the desired contact point, you need to define notification policies.
92
+
93
+
1.[Access](/cockpit/how-to/access-grafana-and-managed-dashboards/) your Grafana dashboard.
94
+
2. Click the **Toggle menu** icon next to **Home** in the top left corner of your screen.
95
+
3. Click **Alerting**, then click **Notification policies**.
96
+
4. Click **+ New nested policy**.
97
+
5. In the **Label** field, enter the label `alertname`.
98
+
6. In the **Operator** field, select **Equals**.
99
+
7. In the **Value** field, enter the name of an existing alert you want your contact point to be notified for. For example, `alert-for-high-cpu-usage`.
100
+
8. Optionally, click **+Add matcher** to add more labels.
101
+
9. In the **Contact point** field, select the contact point you have configured for Slack.
102
+
10. Click **Save policy**. Your nested policy displays. You should now get notified on Slack.
103
+
104
+
<Lightboxsrc="scaleway-slack-alerts-firing.webp"alt="Grafana alert for high CPU usage notification on Slack" />
0 commit comments