Skip to content

docs(Cockpit): add new federation documentation for Cockpit - int-add-observability-federate-doc #5179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Katsuyu
Copy link
Contributor

@Katsuyu Katsuyu commented Jun 25, 2025

Your checklist for this pull request

Description

Add a new documentation "How-to" on how to federate Scaleway product metrics with the new /federate endpoint on Cockpit datasources.

Also add the endpoint in the supported endpoint documentation with precision about beta phase

@Katsuyu Katsuyu requested a review from nerda-codes as a code owner June 25, 2025 09:48
- A running [Prometheus](https://prometheus.io) instance

<Message type="info">
The `/federate` endpoint will not be charged during beta phase but please note that after the beta
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end of sentence missing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `/federate` endpoint will not be charged during beta phase but please note that after the beta
The `/federate` endpoint will not be billed during the beta phase. After the beta, the endpoint will incur additional costs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*may incur additional costs ? as we don't know yet the exact pricing model. but also happy with "will incur"

Comment on lines +60 to +62
<Message type="info">
Please note that you should not include `https://` in the `SCW_DATASOURCE_URL`
</Message>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Message type="info">
Please note that you should not include `https://` in the `SCW_DATASOURCE_URL`
</Message>
<Message type="important">
Do not include `https://` in the `SCW_DATASOURCE_URL`.
</Message>

## Configure your Prometheus

Create a `prometheus.yml` file to configure your Prometheus instance, using the example below.
Make sure to replace `$SCW_DATASOURCE_URL` with the URL of your data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) and to replace `$SCW_READ_TOKEN` with your Cockpit token with read permissions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Make sure to replace `$SCW_DATASOURCE_URL` with the URL of your data source (you can find it under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console) and to replace `$SCW_READ_TOKEN` with your Cockpit token with read permissions.
Make sure you replace `$SCW_DATASOURCE_URL` with the URL of your data source. The URL can be found under the "API URL" section in the [Data sources tab](https://console.scaleway.com/cockpit/dataSource) of the Scaleway console. Replace `$SCW_READ_TOKEN` with your Cockpit token with read permissions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our /federate endpoint works for both Scaleway metrics data source and custom metrics data source. Do we need to say it "with the URL of yoru Scaleway or custom metrics data source" ? maybe overkilling it...

Comment on lines +68 to +71
<Message type="important">
The `/federate` endpoint will not be charged during beta phase but please note that after the beta, this endpoint will incurs additional costs.
For more information, you can check [this tutorial](../how-to/federate-scaleway-metrics.mdx)
</Message>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Message type="important">
The `/federate` endpoint will not be charged during beta phase but please note that after the beta, this endpoint will incurs additional costs.
For more information, you can check [this tutorial](../how-to/federate-scaleway-metrics.mdx)
</Message>
<Message type="important">
The `/federate` endpoint will not be billed during the beta phase. After the beta, the endpoint will incur additional costs.
Refer to the [How to federate metrics](/cockpit/how-to/federate-scaleway-metrics) documentation page for more information.
</Message>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the /federate is not a mimir endpoint, and mimic the prometheus endpoint. Shall we split the list to keep it separate from other mimir endpoints with an introductory sentence saying that there is an additional endpoint we support ? There is a risk users will try to look into mimir documentations to have more information on that endpoint. Or (maybe lighter?) we can leave it in the list but explicitly say in the important banner that it's not a mimir endpoint and to refer to the How to federate metrics documentation page for more information on how to use this endpoint ?

command:
- '--config.file=/etc/prometheus/prometheus.yml'
```
2. Go to http://localhost:9090/targets and you should see your newly created target, federating your Scaleway product metrics
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Go to http://localhost:9090/targets and you should see your newly created target, federating your Scaleway product metrics
2. Go to `http://localhost:9090/targets` and you should see your newly created target, federating your Scaleway product metrics.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem Scaleway products in plural ? or just Scaleway metrics ?

categories:
- observability
dates:
validation: TBD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder to update the dates before publishing

content:
h1: How to federate Scaleway metrics with your own Prometheus
paragraph: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus using Scaleway's comprehensive guide. This tutorial covers retrieving your Scaleway product metrics by federation of your Cockpit datasources and retrieving those metrics within Prometheus.
tags: federation cockpit metrics observability monitoring prometheus
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags: federation cockpit metrics observability monitoring prometheus
tags: federation cockpit metrics prometheus

description: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus
content:
h1: How to federate Scaleway metrics with your own Prometheus
paragraph: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus using Scaleway's comprehensive guide. This tutorial covers retrieving your Scaleway product metrics by federation of your Cockpit datasources and retrieving those metrics within Prometheus.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
paragraph: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus using Scaleway's comprehensive guide. This tutorial covers retrieving your Scaleway product metrics by federation of your Cockpit datasources and retrieving those metrics within Prometheus.
paragraph: Learn how to retrieve your Scaleway product metrics with federation and reuse them within your own Prometheus with this step-by-step guide.

---
meta:
title: How to federate Scaleway metrics with your own Prometheus
description: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus
description: Learn how to retrieve your Scaleway product metrics with federation and reuse them within your own Prometheus with this step-by-step guide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Scaleway products metrics" with products in plural ?
But we can also federate custom metrics... even if that's less useful

- observability
dates:
validation: TBD
posted: TBD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

</Message>

<Message type="important">
- 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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.
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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this banner - we already have just above an info banner saying it's in beta and will eventually occur costs in the future. + there is no information yet in Cockpit's pricing page around this.

Please note that you should not include `https://` in the `SCW_DATASOURCE_URL`
</Message>

Modify the different `match[]` parameters according to the metrics you want to retrive, in this example you will federate:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Modify the different `match[]` parameters according to the metrics you want to retrive, in this example you will federate:
Modify the different `match[]` parameters according to the metrics you want to retrieve. In this example, you will federate:


## Run your Prometheus instance

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaleway products in plural ?


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.

1. Create a `docker-compose.yml` file with :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Create a `docker-compose.yml` file with :
1. Create a `docker-compose.yml` file with:

@nerda-codes nerda-codes added the do not merge PR that shouldn't be merged before a specific date (eg release) label Jun 26, 2025
Comment on lines +68 to +71
<Message type="important">
The `/federate` endpoint will not be charged during beta phase but please note that after the beta, this endpoint will incurs additional costs.
For more information, you can check [this tutorial](../how-to/federate-scaleway-metrics.mdx)
</Message>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the /federate is not a mimir endpoint, and mimic the prometheus endpoint. Shall we split the list to keep it separate from other mimir endpoints with an introductory sentence saying that there is an additional endpoint we support ? There is a risk users will try to look into mimir documentations to have more information on that endpoint. Or (maybe lighter?) we can leave it in the list but explicitly say in the important banner that it's not a mimir endpoint and to refer to the How to federate metrics documentation page for more information on how to use this endpoint ?

- A running [Prometheus](https://prometheus.io) instance

<Message type="info">
The `/federate` endpoint will not be charged during beta phase but please note that after the beta
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*may incur additional costs ? as we don't know yet the exact pricing model. but also happy with "will incur"

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- [Created](/cockpit/how-to/create-token/) a Cockpit token with read access in the same region as the metrics data source
- [Created](/iam/how-to/create-api-keys/) an API key and retrieved your API secret key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need an API key ? (only if we want to create the token from Scw API ?)

</Message>

<Message type="important">
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this banner - we already have just above an info banner saying it's in beta and will eventually occur costs in the future. + there is no information yet in Cockpit's pricing page around this.

<Message type="info">
Please note that you should not include `https://` in the `SCW_DATASOURCE_URL`
</Message>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add a small explanatory paragraph on the scrape interval here ? explaining what it is and guidelines (> 1minutes, esp. if they're federating scw data that has 1 or 5mn intervals).
And if they scrape every minute a metric that is only available every 5minutes they will have repeated metric points no ? What happens in that case ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • what is the honor-labels: true param ? can we say what it does and what happens if they put true or false ?


## Run your Prometheus instance

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaleway products in plural ?

command:
- '--config.file=/etc/prometheus/prometheus.yml'
```
2. Go to http://localhost:9090/targets and you should see your newly created target, federating your Scaleway product metrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem Scaleway products in plural ? or just Scaleway metrics ?

command:
- '--config.file=/etc/prometheus/prometheus.yml'
```
2. Go to http://localhost:9090/targets and you should see your newly created target, federating your Scaleway product metrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add a small paragraph explaining how they can monitor what they're exporting with this endpoint (check the volumes that go out in our Cockpit Grafana metrics explorer, say what metrics have that information). Maybe we can update the doc later, as this is not yet in our dashboard ...

---
meta:
title: How to federate Scaleway metrics with your own Prometheus
description: Learn how to retrieve the Scaleway product metrics with federation to re-use them within your own Prometheus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Scaleway products metrics" with products in plural ?
But we can also federate custom metrics... even if that's less useful

posted: TBD
---

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be nice to have one or two sentences explaining what federation is and what's the point of federating data ? to bring all your data together in a single prometheus data source ? or to downsample metrics (?) for longer retention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge PR that shouldn't be merged before a specific date (eg release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants