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
+44-19Lines changed: 44 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: How to configure alerts for Scaleway resources in Grafana
3
3
description: Learn how to configure alerts for Scaleway resources in Grafana. Follow the steps to create alert rules, define conditions, and set up notifications for your monitored resources.
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.
21
29
@@ -25,12 +33,17 @@ This page shows you how to create alert rules in Grafana for monitoring Scaleway
25
33
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
26
34
- Scaleway resources you can monitor
27
35
-[Created Grafana credentials](/cockpit/how-to/retrieve-grafana-credentials/) with the **Editor** role
Data source managed alert rules allow you to configure alerts managed by the data source of your choice, instead of using Grafana's managed alerting system which is not supported by Cockpit.
46
+
Data source managed alert rules allow you to configure alerts managed by the data source of your choice, instead of using Grafana's managed alerting system **which is not supported by Cockpit**.
34
47
35
48
1.[Log in to Grafana](/cockpit/how-to/access-grafana-and-managed-dashboards/) using your credentials.
36
49
2. Click the Grafana icon in the top left side of your screen to open the menu.
@@ -43,7 +56,7 @@ Data source managed alert rules allow you to configure alerts managed by the dat
43
56
8. In the **Rule type** subsection, click the **Data source-managed** tab.
44
57
<Lightboximage={DataSourceManaged}alt="" />
45
58
<Messagetype="important">
46
-
Data source managed alert rules allow you to configure alerts managed by the data source of your choice, instead of using Grafana's managed alerting system which is not supported by Cockpit.
59
+
Data source managed alert rules allow you to configure alerts managed by the data source of your choice, instead of using Grafana's managed alerting system **which is not supported by Cockpit**.
47
60
This step is **mandatory** because Cockpit does not support Grafana’s built-in alerting system, but only alerts configured and evaluated by the data source itself.
48
61
</Message>
49
62
@@ -62,16 +75,19 @@ Switch between the tabs below to create alerts for a Scaleway Instance, an Objec
62
75
<Messagetype="tip">
63
76
The `instance_server_cpu_seconds_total` metric records how many seconds of CPU time your Instance has used in total. It is helpful to detect unexpected CPU usage spikes.
64
77
</Message>
65
-
2. In the **Set alert evaluation behavior** section, specify how long the condition must be true before triggering the alert.
66
-
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
78
+
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
79
+
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert rules. Rules that share the same group will use the same configuration, including the evaluation interval which determines how often the rule is evaluated (by default: every 1 minute). You can modify this interval later in the group settings.
80
+
<Messagetype="note">
81
+
The evaluation interval is different from the pending period set in step 2. The evaluation interval controls how often the rule is checked, while the pending period defines how long the condition must be continuously met before the alert fires.
82
+
</Message>
67
83
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
68
-
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contact points you may already have created in the Scaleway console.
84
+
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contacts you may already have created in the Scaleway console.
69
85
<Messagetype="note">
70
86
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.
71
-
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).
87
+
For example, if your alert named `alert-for-high-cpu-usage`has the label `team = instances-team`, you are telling Grafana to send a notification to the Instances team when the alert gets triggered. Find out how to [configure notification policies in Grafana](/tutorials/configure-slack-alerting/#configuring-a-notification-policy).
72
88
</Message>
73
89
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
74
-
7. 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).
90
+
7. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contacts](/cockpit/concepts/#contact-points).
75
91
</TabsTab>
76
92
<TabsTablabel="Object Storage bucket">
77
93
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**.
@@ -83,16 +99,19 @@ Switch between the tabs below to create alerts for a Scaleway Instance, an Objec
83
99
<Messagetype="tip">
84
100
The `object_storage_bucket_objects_total` metric indicates the total number of objects stored in a given Object Storage bucket. It is useful to monitor and control object growth in your bucket and avoid hitting thresholds.
85
101
</Message>
86
-
2. In the **Set alert evaluation behavior** section, specify how long the condition must be true before triggering the alert.
87
-
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
102
+
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
103
+
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert rules. Rules that share the same group will use the same configuration, including the evaluation interval which determines how often the rule is evaluated (by default: every 1 minute). You can modify this interval later in the group settings.
104
+
<Messagetype="note">
105
+
The evaluation interval is different from the pending period set in step 2. The evaluation interval controls how often the rule is checked, while the pending period defines how long the condition must be continuously met before the alert fires.
106
+
</Message>
88
107
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
89
-
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contact points you may already have created in the Scaleway console.
108
+
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contacts you may already have created in the Scaleway console.
90
109
<Messagetype="note">
91
110
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.
92
111
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).
93
112
</Message>
94
113
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
95
-
7. 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).
114
+
7. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contacts](/cockpit/concepts/#contact-points).
96
115
</TabsTab>
97
116
<TabsTablabel="Kubernetes pod">
98
117
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.**
@@ -105,15 +124,18 @@ Switch between the tabs below to create alerts for a Scaleway Instance, an Objec
105
124
The `kubernetes_cluster_k8s_shoot_nodes_pods_usage_total` metric represents the total number of pods currently running across all nodes in your Kubernetes cluster. It is helpful to monitor current pod consumption per node pool or cluster, and help track resource saturation or unexpected workload spikes.
106
125
</Message>
107
126
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
108
-
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
127
+
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert rules. Rules that share the same group will use the same configuration, including the evaluation interval which determines how often the rule is evaluated (by default: every 1 minute). You can modify this interval later in the group settings.
128
+
<Messagetype="note">
129
+
The evaluation interval is different from the pending period set in step 2. The evaluation interval controls how often the rule is checked, while the pending period defines how long the condition must be continuously met before the alert fires.
130
+
</Message>
109
131
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
110
-
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contact points you may already have created in the Scaleway console.
132
+
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contacts you may already have created in the Scaleway console.
111
133
<Messagetype="note">
112
134
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.
113
135
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).
114
136
</Message>
115
137
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
116
-
7. 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).
138
+
7. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contacts](/cockpit/concepts/#contact-points).
117
139
</TabsTab>
118
140
<TabsTablabel="Cockpit logs">
119
141
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**.
@@ -126,22 +148,25 @@ Switch between the tabs below to create alerts for a Scaleway Instance, an Objec
126
148
The `observability_cockpit_loki_chunk_store_stored_chunks_total:increase5m` metric represents the number of chunks (log storage blocks) that have been written over the last 5 minutes for a specific resource. It is useful to monitor log ingestion activity and detect issues such as a crash of the logging agent, or your application not producing logs.
127
149
</Message>
128
150
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
129
-
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert, and optionally, add annotations.
151
+
3. Enter a name in the **Namespace** and **Group** fields to categorize and manage your alert rules. Rules that share the same group will use the same configuration, including the evaluation interval which determines how often the rule is evaluated (by default: every 1 minute). You can modify this interval later in the group settings.
152
+
<Messagetype="note">
153
+
The evaluation interval is different from the pending period set in step 2. The evaluation interval controls how often the rule is checked, while the pending period defines how long the condition must be continuously met before the alert fires.
154
+
</Message>
130
155
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
131
-
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contact points you may already have created in the Scaleway console.
156
+
5. Enter a label and value name and click **Save**. You can skip this step if you want your alerts to be sent to the contacts you may already have created in the Scaleway console.
132
157
<Messagetype="note">
133
158
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.
134
159
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).
135
160
</Message>
136
161
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
137
-
7. 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).
162
+
7. Optionally, check that your configuration works by temporarily lowering the threshold. This will trigger the alert and notify your [contacts](/cockpit/concepts/#contact-points).
138
163
</TabsTab>
139
164
</Tabs>
140
165
141
166
**You can configure up to a maximum of 10 alerts** for the `Scaleway Metrics` data source.
142
167
143
168
<Messagetype="tip">
144
-
You can also build your alerts from the Grafana-managed tab, with the metrics explorer (book icon) and **+ Operations** button. However, remember to click the **Data source-managed** tab once you are done building them to receive alert notifications.
169
+
You can also build your PromQL expressions and find the right metrics from the Grafana-managed tab, with the metrics explorer (book icon) and **+ Operations** button. However, remember to click the **Data source-managed** tab once you are done building them to proceed with the final configuration steps.
0 commit comments