NavigationContentFooter
Jump toSuggest an edit

Understanding Cockpit usage and pricing

Reviewed on 18 December 2023Published on 07 June 2023

Cockpit dashboard updates

Starting April 2024, a new version of Cockpit will be released.

In this version, the concept of regionalization will be introduced to offer you more flexibility and resilience for seamless monitoring. If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized data sources.

Cockpit allows you to push your own metrics for various resources. The pricing of our service is based on the number of samples that are ingested per month. Using Cockpit costs €0.15 per million samples ingested per month.

Importance of controlling the rate

If you wish to avoid extra costs, you can define a limit to the number of samples you send to Cockpit. The following table shows an estimate of the pricing (€0.00000015 per sample) based on the push rate of the sample:

Sample ingestion rate per secondsSamples ingested per dayPrice per daySamples ingested per monthPrice per month
186 400€0.012962 678 400€0.4017
10864 000€0.129626 784 000€4.0176
1008 640 000€1.296267 840 000€40.176
100086 400 000€12.962 678 400 000€401.76

How to know my current ingestion rate?

Within the Cockpit dashboard on Grafana, click Cockpit Overview. The panel named Metrics ingestion rate displays the ingestion rate for samples coming from Scaleway products, and the ingestion rate for your own samples if you look at “Other Metrics”.

If you are using your own Grafana to visualize metrics, use the following query sum(rate(observability_cockpit_ingestion_samples_total{is_from_scaleway="false"}[5m])) OR on() vector(0) to know what your current ingestion rate is.

How to control the number of samples sent to Cockpit?

Control the interval between scrapes

A common good practice to control the number of samples you send to Cockpit, is to have a scrape_interval of 1 minute.

Let us say you have 1000 samples exposed and a scrape_interval of 10s. This means you will have a rate of 100 sample/s and pay around €40 per month. If you increase the scrape_interval to 60s, you will have a rate of 1,66 sample/s, which amounts to around €6.69 per month.

Change the scrape interval using Prometheus

If you are using Prometheus to remote write metrics to your Cockpit, you can tweak the scrape_interval using the following configuration:

global:
scrape_interval: 60s
scrape_configs:
...
remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>

Change the scrape interval using the Grafana agent

Here is an example of a Grafana agent configuration file with a scrape interval of 60 seconds:

metrics:
global:
scrape_interval: 60s
remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>
integrations:
...

Control the metrics you are sending

Another good practice to control the number of samples you send to Cockpit, is to only send metrics that you want into your Cockpit, by filtering what you send.

Here is a configuration example with Prometheus:

...
remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>
write_relabel_configs:
- source_labels: [__name__]
regex: 'my_app_metrics(.*)'
action: keep

This configuration will only send metrics starting with my_app_metrics to your Cockpit.

For more information, refer to the Prometheus documentation.

Learn about the agents you are using

Many agents, such as cadvisor and node_exporter expose a lot of metrics by default.

The following metrics collectors are enabled by default on a node_exporter. You can configure them to filter what is sent to your Cockpit.

Use the following configuration example for a Grafana agent with the node_exporter integration:

...
integrations:
node_exporter:
enabled: true
# Anything not provided in the list below will be disabled by default
set_collectors:
- uname
- cpu
- loadavg
- meminfo
- filesystem
- netdev
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway