Scaleway logo
Commands

Documentation for `scw cockpit`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs.

Alerting management commands

Alerting management commands.

Disable the Alert manager

Disabling the Alert manager deletes the contact points you have created and disables managed alerts in the specified Project and region.

Usage:

TerminalCode
scw cockpit alert-manager disable [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Enable the Alert manager

Enabling the Alert manager allows you to enable managed alerts and create contact points in the specified Project and region, to be notified when your Scaleway resources may require your attention.

Usage:

TerminalCode
scw cockpit alert-manager enable [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Get the Alert manager

Retrieve information about the Alert manager which is unique per Project and region. By default the Alert manager is disabled. The output returned displays a URL to access the Alert manager, and whether the Alert manager and managed alerts are enabled.

Usage:

TerminalCode
scw cockpit alert-manager get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Config management commands

Config management commands.

Generate a data source configuration snippet

Generate a ready-to-use configuration snippet for a Cockpit data source.

Supported tools:

  • prometheus: generates a remote_write block for prometheus.yml (metrics data sources only).
  • fluent-bit: generates a fluent-bit.conf snippet with a dummy input and an OpenTelemetry output (logs data sources only).

Use generate-token=true to create a new Cockpit token and inject it directly in the snippet. The token is created with the minimum required write scope for the data source type.

Usage:

TerminalCode
scw cockpit config get <data-source-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
data-source-idID of the data source to generate the configuration forRequired
typeConfiguration template typeRequired
One of: prometheus, fluent-bit
generate-tokenCreate a new Cockpit token and inject it in the generated snippet
token-nameName of the token to create when generate-token=trueDefault: prometheus-push
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Examples:

Generate a Prometheus remote_write snippet

TerminalCode
scw cockpit config get 11111111-1111-1111-1111-111111111111 type=prometheus

Generate a Prometheus remote_write snippet with a new token

TerminalCode
scw cockpit config get 11111111-1111-1111-1111-111111111111 type=prometheus generate-token=true

Generate a Prometheus remote_write snippet with a named token

TerminalCode
scw cockpit config get 11111111-1111-1111-1111-111111111111 type=prometheus generate-token=true token-name=my-prometheus

Generate a Fluent Bit configuration snippet

TerminalCode
scw cockpit config get 11111111-1111-1111-1111-111111111111 type=fluent-bit

Generate a Fluent Bit configuration snippet with a new token

TerminalCode
scw cockpit config get 11111111-1111-1111-1111-111111111111 type=fluent-bit generate-token=true

Contact point management commands

Contact point management commands.

Create a contact point

Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to. The source of the alerts are data sources within the same Project and region as the Alert manager. If you need to receive alerts for other receivers, you can create additional contact points and receivers in Grafana. Make sure that you select the Scaleway Alert manager.

Usage:

TerminalCode
scw cockpit contact-point create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
email.to
send-resolved-notificationsSend an email notification when an alert is marked as resolved
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Delete a contact point

Delete a contact point associated with the default receiver.

Usage:

TerminalCode
scw cockpit contact-point delete [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
email.to
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

List contact points

Retrieve a list of contact points for the specified Project. The response lists all contact points and receivers created in Grafana or via the API.

Usage:

TerminalCode
scw cockpit contact-point list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, all

Datasource management commands

Datasource management commands.

Create a data source

You must specify the data source name and type (metrics, logs, traces) upon creation. The name of the data source will then be used as reference to name the associated Grafana data source.

Usage:

TerminalCode
scw cockpit data-source create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameData source nameRequired
typeData source typeRequired
One of: unknown_type, metrics, logs, traces
retention-daysDuration for which the data will be retained in the data source
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Delete a data source

Delete a given data source. Note that this action will permanently delete this data source and any data associated with it.

Usage:

TerminalCode
scw cockpit data-source delete <data-source-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
data-source-idID of the data source to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Get a data source

Retrieve information about a given data source, specified by the data source ID. The data source's information such as its name, type, URL, origin, and retention period, is returned.

Usage:

TerminalCode
scw cockpit data-source get <data-source-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
data-source-idID of the relevant data sourceRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

List data sources

Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order.

Usage:

TerminalCode
scw cockpit data-source list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
originOrigin to filter for, only data sources with matching origin will be returned. If omitted, all types will be returnedOne of: unknown_origin, scaleway, external, custom
types.{index}Types to filter for (metrics, logs, traces), only data sources with matching types will be returned. If omitted, all types will be returnedOne of: unknown_type, metrics, logs, traces
order-bySort order for data sources in the responseOne of: created_at_asc, created_at_desc, name_asc, name_desc, type_asc, type_desc
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, all

Update a data source

Update a given data source attributes (name and/or retention_days).

Usage:

TerminalCode
scw cockpit data-source update <data-source-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
data-source-idID of the data source to updateRequired
nameUpdated name of the data source
retention-daysDuration for which the data will be retained in the data source
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Grafana user management commands

Grafana user management commands.

Get your Cockpit's Grafana

Retrieve information on your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to. The output returned displays the URL to access your Cockpit's Grafana.

Usage:

TerminalCode
scw cockpit grafana get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used

Synchronize Grafana data sources

Trigger the synchronization of all your data sources and the alert manager in the relevant regions. The alert manager will only be synchronized if you have enabled it.

Usage:

TerminalCode
scw cockpit grafana sync-data-sources [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used

Grafana user management commands

Grafana user management commands.

(Deprecated) EOL 2026-01-20

Create a Grafana user Create a Grafana user to connect to your Cockpit's Grafana. Upon creation, your user password displays only once, so make sure that you save it. Each Grafana user is associated with a role: viewer or editor. A viewer can only view dashboards, whereas an editor can create and edit dashboards. Note that the admin username is not available for creation.

Usage:

TerminalCode
scw cockpit grafana-user create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
loginUsername of the Grafana user. Note that the admin username is not available for creation
roleRole assigned to the Grafana userOne of: unknown_role, editor, viewer

(Deprecated) EOL 2026-01-20

Delete a Grafana user Delete a Grafana user from your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user.

Usage:

TerminalCode
scw cockpit grafana-user delete [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
grafana-user-idID of the Grafana userRequired

(Deprecated) EOL 2026-01-20

List Grafana users List all Grafana users created in your Cockpit's Grafana. By default, the Grafana users returned in the list are ordered in ascending order.

Usage:

TerminalCode
scw cockpit grafana-user list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder of the Grafana usersOne of: login_asc, login_desc
project-idProject ID to use. If none is passed the default project ID will be used

(Deprecated) EOL 2026-01-20

Reset a Grafana user password Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user. A new password regenerates and only displays once. Make sure that you save it.

Usage:

TerminalCode
scw cockpit grafana-user reset-password [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
grafana-user-idID of the Grafana userRequired

Managed alerts management commands

Managed alerts management commands.

Managed alerts management commands.

Usage:

TerminalCode
scw cockpit managed-alerts

Pricing plans management commands

Pricing plans management commands.

Get current plan

Retrieve a pricing plan for the given Project, specified by the ID of the Project. Deprecated due to retention now being managed at the data source level.

Usage:

TerminalCode
scw cockpit plan get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used

List plan types

Retrieve a list of available pricing plan types. Deprecated due to retention now being managed at the data source level.

Usage:

TerminalCode
scw cockpit plan list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOne of: name_asc, name_desc

Apply a pricing plan

Apply a pricing plan on a given Project. You must specify the ID of the pricing plan type. Note that you will be billed for the plan you apply. Deprecated due to retention now being managed at the data source level.

Usage:

TerminalCode
scw cockpit plan select [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
plan-nameName of the pricing planOne of: unknown_name, free, premium, custom

Product dashboards management commands

Product dashboards management commands.

Get Scaleway resource dashboard

Retrieve information about the dashboard of a Scaleway resource in Grafana, specified by the ID of the Project the Cockpit belongs to, and the name of the dashboard.

Usage:

TerminalCode
scw cockpit product-dashboards get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
dashboard-nameName of the dashboardRequired

List Scaleway resources dashboards

Retrieve a list of available dashboards in Grafana, for all Scaleway resources which are integrated with Cockpit.

Usage:

TerminalCode
scw cockpit product-dashboards list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
tags.{index}Tags to filter for

Test alert management commands

Test alert management commands.

Trigger a test alert

Send a test alert to the Alert manager to make sure your contact points get notified.

Usage:

TerminalCode
scw cockpit test-alert trigger [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Token management commands

Token management commands.

Create a token

Give your token the relevant scopes to ensure it has the right permissions to interact with your data sources and the Alert manager. Make sure that you create your token in the same regions as the data sources you want to use it for. Upon creation, your token's secret key display only once. Make sure that you save it.

Usage:

TerminalCode
scw cockpit token create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
nameName of the tokenRequired
token-scopes.{index}Token permission scopesOne of: unknown_scope, read_only_metrics, write_only_metrics, full_access_metrics_rules, read_only_logs, write_only_logs, full_access_logs_rules, full_access_alert_manager, read_only_traces, write_only_traces
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Delete a token

Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone.

Usage:

TerminalCode
scw cockpit token delete <token-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
token-idID of the token to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

Get a token

Retrieve information about a given token, specified by the token ID. The token's information such as its scopes, is returned.

Usage:

TerminalCode
scw cockpit token get <token-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
token-idToken IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw

List tokens

Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes.

Usage:

TerminalCode
scw cockpit token list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
token-scopes.{index}Token scopes to filter forOne of: unknown_scope, read_only_metrics, write_only_metrics, full_access_metrics_rules, read_only_logs, write_only_logs, full_access_logs_rules, full_access_alert_manager, read_only_traces, write_only_traces
order-byOrder in which to return resultsOne of: created_at_asc, created_at_desc, name_asc, name_desc
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw, all

Usage overview management commands

Usage overview management commands.

Get data source usage overview

Retrieve the volume of data ingested for each of your data sources in the specified project and region.

Usage:

TerminalCode
scw cockpit usage-overview get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
project-idProject ID to use. If none is passed the default project ID will be used
interval
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, nl-ams, pl-waw