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
- Renamed Scaleway product metrics to Scaleway metrics
- Add paragraph on how to monitor federated metrics volume
- Add scaleway metrics in example
- Add info on honor_labels field in config
- Increased scrape_interval in config
- Removed useless API key field in pre-requisite
Copy file name to clipboardExpand all lines: pages/cockpit/how-to/federate-scaleway-metrics.mdx
+29-14Lines changed: 29 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
meta:
3
3
title: How to federate Scaleway metrics with your own Prometheus
4
-
description: Learn how to retrieve your Scaleway product metrics with federation and reuse them within your own Prometheus with this step-by-step guide.
4
+
description: Learn how to retrieve your Scaleway metrics with federation and reuse them within your own Prometheus with this step-by-step guide.
5
5
content:
6
6
h1: How to federate Scaleway metrics with your own Prometheus
7
-
paragraph: Learn how to retrieve your Scaleway product metrics with federation and reuse them within your own Prometheus with this step-by-step guide.
7
+
paragraph: Learn how to retrieve your Scaleway metrics with federation and reuse them within your own Prometheus with this step-by-step guide.
In this page, we will show you how to federate your Scaleway product metrics using the `/federate` endpoint of your Scaleway datasources with a [Prometheus](https://prometheus.io) configuration.
16
+
In this page, we will show you how to federate your Scaleway metrics using the `/federate` endpoint of your Scaleway datasources with a [Prometheus](https://prometheus.io) configuration.
17
17
18
18
<Macroid="requirements" />
19
19
20
20
- A Scaleway account logged into the [console](https://console.scaleway.com)
21
21
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
22
22
-[Created](/cockpit/how-to/create-token/) a Cockpit token with read access in the same region as the metrics data source
23
-
-[Created](/iam/how-to/create-api-keys/) an API key and retrieved your API secret key
24
23
- A running [Prometheus](https://prometheus.io) instance
25
24
26
25
<Messagetype="info">
27
26
The `/federate` endpoint will not be billed during the beta phase. After the beta, the endpoint will incur additional costs.
28
27
</Message>
29
28
30
-
<Messagetype="important">
31
-
- Federating Scaleway product metrics is a billable feature. Refer to the [product pricing](https://www.scaleway.com/en/pricing/?tags=available,managedservices-observability-cockpit) page for more information.
32
-
</Message>
29
+
Prometheus federation is usefull to gather all or your metrics in a unique Prometheus insance, or downsampling your different metrics to reduce the storage used by your metrics.
30
+
Since you have full control over your Prometheus instance, you can also use federation to increase metrics retention.
33
31
34
32
## Configure your Prometheus
35
33
@@ -38,7 +36,7 @@ Make sure you replace `$SCW_DATASOURCE_URL` with the URL of your data source. Th
Modify the different `match[]` parameters according to the metrics you want to retrieve. In this example, you will federate:
65
-
- All metrics called `my-scaleway-metrics`
66
-
- All metrics with the label `job` with the value `my-wanted-job`
63
+
- All metrics called `instance_server_cpu_seconds_total`
64
+
- All metrics with the label `region` with the value `fr-par`
65
+
66
+
You can also set `honor_labels` to `false` if you prefer to not override the different labels that your Prometheus could set that conflict with Scaleway metrics label.
67
+
For example, with `honor_labels` set to `false` the Scaleway label `job` will be relabelled as `exported_job` to avoid collision.
67
68
68
69
## Run your Prometheus instance
69
70
70
-
Once you have configured your `prometheus.yml` file, you can use docker-compose to run your Prometheus instance with the configuration and start federating Scaleway product metrics.
71
+
Once you have configured your `prometheus.yml` file, you can use docker-compose to run your Prometheus instance with the configuration and start federating Scaleway metrics.
71
72
72
73
1. Create a `docker-compose.yml` file with:
73
74
```yaml
@@ -83,4 +84,18 @@ Once you have configured your `prometheus.yml` file, you can use docker-compose
83
84
- '--config.file=/etc/prometheus/prometheus.yml'
84
85
```
85
86
86
-
2. Go to `http://localhost:9090/targets` and you should see your newly created target, federating your Scaleway product metrics.
87
+
2. Go to `http://localhost:9090/targets` and you should see your newly created target, federating your Scaleway metrics.
88
+
89
+
## Monitor your federation volumes
90
+
91
+
You can monitor the amout of samples federated with the `/federate` endpoint by looking at the `observability_cockpit_federate_exported_sample_total:increase5m` in your Cockpit.
92
+
The metrics indicate the total of exported metrics by federation, over 5 min interval.
93
+
94
+
1. Go to the Cockpit page on the Scaleway console
95
+
2. Click on `Open dashboards` to open your Grafana
96
+
3. Go to the Explore tab on the left panel
97
+
4. Search for the `observability_cockpit_federate_exported_sample_total:increase5m` metrics
98
+
99
+
<Message type="info">
100
+
You can federate this metrics to have monitor your volume of federated metrics in your Prometheus instance.
0 commit comments