Skip to main content

sloctl

β›­ Bulk retrieval of SLOs, alert policies, alerts, and other data from Nobl9​

You can export all data from our application. For this, run the following script:

for obj in agents alertmethods alertpolicies alerts annotations dataexports directs projects rolebindings services slos
do
sloctl get -A $obj > $obj.yaml
done

β›­ Setting up data export through sloctl​

Data export is an Enterprise Edition feature.
Read YAML guide for a detailed explanation on setting up data export using sloctl.

β›­ Error 400 when obtaining an access token from the customer's identity provider while configuring sloctl​

VPN deactivation can troubleshoot in the case of the following error:

Error: error getting new access token from the customer identity provider:
cannot access the token, customer identity provider replied with 400 \{"errorCode":"invalid_client",
"errorSummary":"A client_id must be provided in the request.","errorLink":"invalid_client",
"errorId”:”xxxxxxx,”errorCauses":[]\}

β›­ Linters for sloctl YAML files​

For sloctl yaml linting and validation against the yaml spec, you can use, for example, the yamllint tool.

β›­ Avoiding personal access tokens in pipeline code​

To illustrate: you need an access token to create a resource in Nobl9 using sloctl.
A possible solution can be creating a dedicated user to generate a token in the CI/CD. This approach ensures authorization without binding your personal access token in the pipeline code.

Read the Nobl9 API reference for details on the access token endpoint.
Also, Nobl9's POST endpoint lets obtain the access token for sloctl or Nobl9 annotations API.
We recommend caching these credentials early on and reusing them in the CI/CD steps, as calling this endpoint a lot can exhaust limits.