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: pages/cockpit/how-to/configure-alerts-for-scw-resources.mdx
+35-36Lines changed: 35 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ content:
8
8
categories:
9
9
- observability cockpit
10
10
dates:
11
-
validation: 2025-05-09
11
+
validation: 2025-05-12
12
12
posted: 2023-11-06
13
13
---
14
14
15
15
16
-
Cockpit does not support Grafana-managed alerting. It integrates with Grafana to visualize metrics, but alerts are managed through the Scaleway alert manager. You should use Grafana only to define alert rules, not to evaluate or receive alert notifications. Once the conditions of your alert rule are met, the Scaleway alert manager evaluates the rule and sends a notification to the **contact points you have configured in the Scaleway console**.
16
+
Cockpit does not support Grafana-managed alerting. It integrates with Grafana to visualize metrics, but alerts are managed through the Scaleway alert manager. You should use Grafana only to define alert rules, not to evaluate or receive alert notifications. Once the conditions of your alert rule are met, the Scaleway alert manager evaluates the rule and sends a notification to the contact points you have configured in the Scaleway console or in Grafana.
17
17
18
18
This page shows you how to create alert rules in Grafana for monitoring Scaleway resources integrated with Cockpit, such as Instances, Object Storage, and Kubernetes. These alerts rely on Scaleway-provided metrics, which are preconfigured and available in the **Metrics browser** drop-down when using the **Scaleway Metrics data source** in the Grafana interface. This page explains how to use the `Scaleway Metrics` data source, interpret metrics, set alert conditions, and activate alerts.
19
19
@@ -24,8 +24,7 @@ This page shows you how to create alert rules in Grafana for monitoring Scaleway
24
24
- Scaleway resources you can monitor
25
25
-[Created Grafana credentials](/cockpit/how-to/retrieve-grafana-credentials/) with the **Editor** role
26
26
-[Enabled](/cockpit/how-to/enable-alert-manager/) the Scaleway alert manager
27
-
-[Created](/cockpit/how-to/add-contact-points/) at least one contact point **in the Scaleway console**, otherwise, alerts will not be delivered
28
-
- Selected the **Scaleway Alerting** alert manager in Grafana
27
+
-[Created](/cockpit/how-to/add-contact-points/) a contact point in the Scaleway console or in Grafana (with the `Scaleway Alerting` alert manager of the same region as your `Scaleway Metrics` data source), otherwise alerts will not be delivered
29
28
30
29
## Switch to data source managed alert rules
31
30
@@ -45,8 +44,8 @@ Switch between the tabs below to create alerts for a Scaleway Instance, an Objec
45
44
<TabsTablabel="Scaleway Instance">
46
45
The steps below explain how to create the metric selection and configure an alert condition that triggers when **your Instance consumes more than 10% of a single CPU core over the past 5 minutes.**
47
46
48
-
1. Type a name for your alert.
49
-
2. Select the data source you want to configure alerts for. For the sake of this documentation, we are choosing the **Scaleway Metrics** data source.
47
+
1. Type a name for your alert. For example, `alert-for-high-cpu-usage`.
7. Click **Use query** to validate your metric selection. Your selection displays in the query field next to the **Metrics browser** button. This prepares it for use in the alert condition, which we will define in the next steps.
61
-
8. In the query field, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id` and `resource_name`) correspond to those of the target resource.
59
+
7. Click **Use query** to validate your metric selection.
60
+
8. In the query field next to the **Metrics browser** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id` and `resource_name`) correspond to those of the target resource.
9. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
65
+
10. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
66
+
11. Enter a label in the **Labels** field and a name in the **Value** field.
66
67
<Messagetype="note">
67
-
For example, to wait until the condition has been met continuously for 5 minutes, type `5` and select `minutes` in the drop-down.
68
+
In Grafana, notifications are sent by matching alerts to notification policies based on labels. This step is about deciding how alerts will reach you or your team (Slack, email, etc.) based on labels you attach to them. Then, you can set up rules that define who receives notifications in the **Notification policies** page.
69
+
For example, if an alert has the label `team = instances-team`, you are telling Grafana to send a notification to the Instances team when your alert `alert-for-high-cpu-usage` gets triggered. Find out how to [configure notification policies in Grafana](/tutorials/configure-slack-alerting/#configuring-a-notification-policy).
68
70
</Message>
69
-
10. Enter a namespace in the **Namespace** field to help you categorize and manage your alert, then click **Enter**.
70
-
11. Enter a name in the **Group** field to help you categorize and manage your alert, then click **Enter**.
71
-
12. Optionally, add a summary and a description.
72
-
13. Click **Save rule** in the top right corner of your screen to save and activate your alert.
73
-
14. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and your [contact point](/cockpit/concepts/#contact-points) should receive an email informing them that the alert is firing.
71
+
12. Click **Save rule** in the top right corner of your screen to save and activate your alert.
72
+
13. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contact point](/cockpit/concepts/#contact-points).
74
73
</TabsTab>
75
74
<TabsTablabel="Object Storage bucket">
76
75
The steps below explain how to create the metric selection and configure an alert condition that triggers when **the object count in your bucket exceeds a specific threshold**.
77
76
78
77
1. Type a name for your alert.
79
-
2. Select the data source you want to configure alerts for. For the sake of this documentation, we are choosing the **Scaleway Metrics** data source.
9. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
94
+
10. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
95
+
11. Enter a label in the **Labels** field and a name in the **Value** field.
95
96
<Messagetype="note">
96
-
For example, to wait until the condition has been met continuously for 5 minutes, type `5` and select `minutes` in the drop-down.
97
+
In Grafana, notifications are sent by matching alerts to notification policies based on labels. This step is about deciding how alerts will reach you or your team (Slack, email, etc.) based on labels you attach to them. Then, you can set up rules that define who receives notifications in the **Notification policies** page.
98
+
For example, if an alert has the label `team = object-storage-team`, you are telling Grafana to send a notification to the Object Storage team when your alert is firing. Find out how to [configure notification policies in Grafana](/tutorials/configure-slack-alerting/#configuring-a-notification-policy).
97
99
</Message>
98
-
10. Enter a namespace in the **Namespace** field to help you categorize and manage your alert, then click **Enter**.
99
-
11. Enter a name in the **Group** field to help you categorize and manage your alert, then click **Enter**.
100
-
12. Optionally, add a summary and a description.
101
-
13. Click **Save rule** in the top right corner of your screen to save and activate your alert.
102
-
14. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and your [contact point](/cockpit/concepts/#contact-points) should receive an email informing them that the alert is firing.
100
+
12. Click **Save rule** in the top right corner of your screen to save and activate your alert.
101
+
13. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contact point](/cockpit/concepts/#contact-points).
103
102
</TabsTab>
104
103
<TabsTablabel="Kubernetes pod">
105
104
The steps below explain how to create the metric selection and configure an alert condition that triggers when **no new pod activity occurs, which could mean your cluster is stuck or unresponsive.**
106
105
107
106
1. Type a name for your alert.
108
-
2. Select the data source you want to configure alerts for. For the sake of this documentation, we are choosing the **Scaleway Metrics** data source.
9. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
123
+
10. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
124
+
11. Enter a label in the **Labels** field and a name in the **Value** field.
124
125
<Messagetype="note">
125
-
For example, to wait until the condition has been met continuously for 5 minutes, type `5` and select `minutes` in the drop-down.
126
+
In Grafana, notifications are sent by matching alerts to notification policies based on labels. This step is about deciding how alerts will reach you or your team (Slack, email, etc.) based on labels you attach to them. Then, you can set up rules that define who receives notifications in the **Notification policies** page.
127
+
For example, if an alert has the label `team = kubernetes-team`, you are telling Grafana to send a notification to the Kubernetes team when your alert is firing. Find out how to [configure notification policies in Grafana](/tutorials/configure-slack-alerting/#configuring-a-notification-policy).
126
128
</Message>
127
-
10. Enter a namespace in the **Namespace** field to help you categorize and manage your alert, then click **Enter**.
128
-
11. Enter a name in the **Group** field to help you categorize and manage your alert, then click **Enter**.
129
-
12. Optionally, add a summary and a description.
130
-
13. Click **Save rule** in the top right corner of your screen to save and activate your alert.
131
-
14. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and your [contact point](/cockpit/concepts/#contact-points) should receive an email informing them that the alert is firing.
129
+
12. Click **Save rule** in the top right corner of your screen to save and activate your alert.
130
+
13. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contact point](/cockpit/concepts/#contact-points).
132
131
</TabsTab>
133
132
<TabsTablabel="Cockpit logs">
134
133
The steps below explain how to create the metric selection and configure an alert condition that triggers when **no logs are stored for 5 minutes, which may indicate your app or system is broken**.
135
134
136
135
1. Type a name for your alert.
137
-
2. Select the data source you want to configure alerts for. For the sake of this documentation, we are choosing the **Scaleway Metrics** data source.
9. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
152
+
10. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
153
+
11. Enter a label in the **Labels** field and a name in the **Value** field.
153
154
<Messagetype="note">
154
-
For example, to wait until the condition has been met continuously for 5 minutes, type `5` and select `minutes` in the drop-down.
155
+
In Grafana, notifications are sent by matching alerts to notification policies based on labels. This step is about deciding how alerts will reach you or your team (Slack, email, etc.) based on labels you attach to them. Then, you can set up rules that define who receives notifications in the **Notification policies** page.
156
+
For example, if an alert has the label `team = cockpit-team`, you are telling Grafana to send a notification to the Cockpit team when your alert is firing. Find out how to [configure notification policies in Grafana](/tutorials/configure-slack-alerting/#configuring-a-notification-policy).
155
157
</Message>
156
-
10. Enter a namespace in the **Namespace** field to help you categorize and manage your alert, then click **Enter**.
157
-
11. Enter a name in the **Group** field to help you categorize and manage your alert, then click **Enter**.
158
-
12. Optionally, add a summary and a description.
159
-
13. Click **Save rule** in the top right corner of your screen to save and activate your alert. Your alert will start evaluating based on the rule you have defined.
160
-
14. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and your [contact point](/cockpit/concepts/#contact-points) should receive an email informing them that the alert is firing.
158
+
12. Click **Save rule** in the top right corner of your screen to save and activate your alert.
159
+
13. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contact point](/cockpit/concepts/#contact-points).
161
160
</TabsTab>
162
161
</Tabs>
163
162
164
-
You can view your firing alerts in the **Alert rules** section of your Grafana (Home > Alerting > Alert rules).
163
+
You can view your firing alerts in the **Alert rules** section of your Grafana (**Home** > **Alerting** > **Alert rules**).
0 commit comments