Skip to content
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

docs(cpt): add info about product integration with Cockpit #4205

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion menu/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3572,7 +3572,7 @@
{
"items": [
{
"label": "Understanding Cockpit usage and pricing",
"label": "Understanding how to control Cockpit usage and pricing",
"slug": "understanding-cockpit-usage"
},
{
Expand Down
2 changes: 1 addition & 1 deletion observability/cockpit/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ You can push logs with any Loki-compatible agent such as [Promtail](https://graf

## Preconfigured alerts

Preconfigured alerts are regionalized alerting rules that Scaleway defines for you. They are active in all the regions where you have enabled the [alert manager](#alert-manager). You can think of them as alarm sensors. They allow you to receive alerts for behaviors that we deem abnormal on your resources. Preconfigured alerts only apply to the metrics and logs of your Scaleway resources.
Preconfigured alerts are regionalized alerting rules that Scaleway defines for you. They are active in all the regions where you have enabled the [alert manager](#alert-manager). You can think of them as alarm sensors. They allow you to receive alerts for behaviors that we deem abnormal on your resources. Find out which of your Scaleway resources integrated with Cockpit have preconfigured alerts by referring to the **Alerts** column in the [dedicated documentation](/observability/cockpit/reference-content/cockpit-limitations/#product-integration-into-cockpit).

<Message type="note">
You must enable the alert manager to enable preconfigured alerts. Preconfigured alerts will only be active in the regions where you have enabled the alert manager.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
---
meta:
title: Understanding Cockpit usage and pricing
description: Explore Cockpit's usage and pricing details, including how to manage and optimize costs by controlling the amount of metrics ingested. Learn to adjust scrape intervals and filter metrics effectively, ensuring efficient resource monitoring without unnecessary expenses.
title: Understanding how to control Cockpit usage and pricing
description: Explore how to control Cockpit's usage and pricing, including how to manage and optimize costs by controlling the amount of metrics ingested. Learn to adjust scrape intervals and filter metrics effectively, ensuring efficient resource monitoring without unnecessary expenses.
content:
h1: Understanding Cockpit usage and pricing
paragraph: Explore Cockpit's usage and pricing details, including how to manage and optimize costs by controlling the amount of metrics ingested. Learn to adjust scrape intervals and filter metrics effectively, ensuring efficient resource monitoring without unnecessary expenses.
h1: Understanding how to control Cockpit usage and pricing
paragraph: Explore how to control Cockpit's usage and pricing, including how to manage and optimize costs by controlling the amount of metrics ingested. Learn to adjust scrape intervals and filter metrics effectively, ensuring efficient resource monitoring without unnecessary expenses.
tags: observability cockpit retention metrics logs
dates:
validation: 2024-11-04
validation: 2025-01-15
posted: 2023-06-07
categories:
- observability
---


Cockpit allows you to [push custom metrics](/observability/cockpit/how-to/send-metrics-logs-to-cockpit/) 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.
This page explains how to fine-tune your metrics ingestion rate while using Cockpit. Find out more about Cockpit pricing in the [dedicated documentation](/faq/cockpit/#how-am-i-billed-for-using-cockpit-with-my-scaleway-data).

## 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:
If you wish to avoid extra costs, you can define a limit to the number of samples of metrics you send to Cockpit.
The following table shows an estimate of the pricing (€0.00000015 per sample of metrics) based on the push rate of the sample:


| Sample ingestion rate per seconds | Samples ingested per day | Price per day | Samples ingested per month | Price per month |
Expand Down Expand Up @@ -52,14 +50,14 @@ If you are using Prometheus to remote write metrics to your Cockpit, you can twe
```yaml
global:
scrape_interval: 60s

scrape_configs:
...

remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
- url: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>
"X-Token": <COCKPIT_TOKEN_SECRET_KEY>
```

#### Change the scrape interval using the Grafana agent
Expand All @@ -71,9 +69,9 @@ Here is an example of a Grafana agent configuration file with a scrape interval
global:
scrape_interval: 60s
remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
- url: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>
"X-Token": <COCKPIT_TOKEN_SECRET_KEY>
integrations:
...
```
Expand All @@ -87,9 +85,9 @@ Here is a configuration example with Prometheus:
...

remote_write:
- url: https://metrics.cockpit.fr-par.scw.cloud/api/v1/push
- url: https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.metrics.cockpit.fr-par.scw.cloud/api/v1/push
headers:
"X-Token": <your-cockpit-token>
"X-Token": <COCKPIT_TOKEN_SECRET_KEY>
write_relabel_configs:
- source_labels: [__name__]
regex: 'my_app_metrics(.*)'
Expand All @@ -106,17 +104,16 @@ Many agents, such as `cadvisor` and `node_exporter` expose a lot of metrics by d

The [following metrics collectors](https://github.com/prometheus/node_exporter#enabled-by-default) 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:
Use the following configuration example for a Grafana Alloy agent with the `prometheus.exporter.unix` integration. For more information on how to configure and use the Grafana Alloy agent, refer to the [dedicated documentation](/observability/cockpit/how-to/send-metrics-with-grafana-alloy/).

```yaml
...
integrations:
node_exporter:
enabled: true
# Anything not provided in the list below will be disabled by default
prometheus.exporter.unix "node" {:
set_collectors:
# Anything not provided in the list below will be disabled by default
- uname
- cpu
- cpufreq
- loadavg
- meminfo
- filesystem
Expand Down
Loading