Skip to content

Commit bd87609

Browse files
committed
docs(add): draft
1 parent cdf7714 commit bd87609

File tree

2 files changed

+47
-42
lines changed

2 files changed

+47
-42
lines changed

pages/cockpit/how-to/configure-alerts-for-scw-resources.mdx

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: How to configure alerts for Scaleway resources in Grafana
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.
2+
title: How to configure custom alerts in Grafana
3+
description: Learn how to configure custom alerts for Scaleway resources in Grafana. Follow the steps to create alert rules, define conditions, and set up notifications for your monitored resources.
44
dates:
55
validation: 2025-08-20
66
posted: 2023-11-06
@@ -57,102 +57,107 @@ Data source managed alert rules allow you to configure alerts managed by the dat
5757
Switch between the tabs below to create alerts for a Scaleway Instance, an Object Storage bucket, a Kubernetes cluster Pod, or Cockpit logs.
5858

5959
<Tabs id="install">
60-
<TabsTab label="Scaleway Instance">
61-
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.**
60+
<TabsTab label="Scaleway Instance">
61+
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.**
6262

63-
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id`) correspond to those of the target resource.
63+
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id`) correspond to those of the target resource.
6464
```bash
6565
rate(instance_server_cpu_seconds_total{resource_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}[5m]) > 0.1
6666
```
6767
<Message type="tip">
6868
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.
6969
</Message>
70-
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
71-
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.
70+
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
71+
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.
7272
<Message type="note">
7373
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.
7474
</Message>
75-
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
76-
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.
75+
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
76+
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.
7777
<Message type="note">
7878
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.
7979
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).
8080
</Message>
81-
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
82-
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).
83-
</TabsTab>
84-
<TabsTab label="Object Storage bucket">
85-
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**.
81+
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
82+
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).
83+
</TabsTab>
84+
<TabsTab label="Object Storage bucket">
85+
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**.
8686

87-
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id` and `region`) correspond to those of the target resource.
87+
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_id` and `region`) correspond to those of the target resource.
8888
```bash
8989
object_storage_bucket_objects_total{region="fr-par", resource_id="my-bucket"} > 2000
9090
```
9191
<Message type="tip">
9292
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.
9393
</Message>
94-
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
95-
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.
94+
95+
2. In the **Set alert evaluation behavior** section, specify how long the condition must be met before triggering the alert.
96+
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.
97+
9698
<Message type="note">
9799
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.
98100
</Message>
99-
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
100-
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.
101+
102+
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
103+
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.
104+
101105
<Message type="note">
102106
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.
103107
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).
104108
</Message>
105-
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
106-
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).
107-
</TabsTab>
108-
<TabsTab label="Kubernetes Pod">
109-
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.**
110109

111-
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_name`) correspond to those of the target resource.
110+
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
111+
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).
112+
</TabsTab>
113+
<TabsTab label="Kubernetes Pod">
114+
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.**
115+
116+
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_name`) correspond to those of the target resource.
112117
```bash
113118
rate(kubernetes_cluster_k8s_shoot_nodes_pods_usage_total{resource_name="k8s-par-quizzical-chatelet"}[15m]) == 0
114119
```
115120
<Message type="tip">
116121
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.
117122
</Message>
118-
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
119-
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.
123+
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
124+
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.
120125
<Message type="note">
121126
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.
122127
</Message>
123-
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
124-
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.
128+
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
129+
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.
125130
<Message type="note">
126131
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.
127132
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).
128133
</Message>
129134
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
130135
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).
131-
</TabsTab>
132-
<TabsTab label="Cockpit logs">
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**.
136+
</TabsTab>
137+
<TabsTab label="Cockpit logs">
138+
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**.
134139

135-
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_name`) correspond to those of the target resource.
140+
1. In the query field next to the **Loading metrics... >** button, paste the following query. Make sure that the values for the labels you have selected (for example, `resource_name`) correspond to those of the target resource.
136141
```bash
137142
observability_cockpit_loki_chunk_store_stored_chunks_total:increase5m{resource_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"} == 0
138143
```
139144
<Message type="tip">
140145
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.
141146
</Message>
142-
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
143-
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.
147+
2. In the **Set alert evaluation behavior** field, specify how long the condition must be true before triggering the alert.
148+
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.
144149
<Message type="note">
145150
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.
146151
</Message>
147-
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
148-
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.
152+
4. In the **Configure labels and notifications** section, click **+ Add labels**. A pop-up appears.
153+
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.
149154
<Message type="note">
150155
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.
151156
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).
152157
</Message>
153-
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
154-
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).
155-
</TabsTab>
158+
6. Click **Save rule and exit** in the top right corner of your screen to save and activate your alert.
159+
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).
160+
</TabsTab>
156161
</Tabs>
157162

158163
**You can configure up to a maximum of 10 alerts** for the `Scaleway Metrics` data source.

pages/cockpit/how-to/enable-alert-manager.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: How to enable the alert manager
2+
title: How to configure the alert manager
33
description: Learn how to enable Scaleway's regionalized alert manager and add contacts to configure alert notifications for your resources.
44
categories:
55
- observability
66
dates:
7-
validation: 2025-07-29
7+
validation: 2025-10-16
88
posted: 2024-04-05
99
---
1010
import Requirements from '@macros/iam/requirements.mdx'

0 commit comments

Comments
 (0)