Skip to main content

sloctl

Is there a way to retrieve all my SLOs, alert policies, alerts, and other data from Nobl9?โ€‹

  • Yes, you can export all the data from our application by using 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

Is there a way to set up a data export through sloctl?โ€‹


I keep getting 400 error when getting a new access token from the customer identity provider while configuring sloctl.โ€‹

  • If youโ€™re getting the following error, try disabling a VPN:
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":[]}

Are there any linting or validating tools for sloctl yaml files?โ€‹

  • For the linting and validation of the sloctl yaml against the yaml spec, you can use, for example, the yamllint tool to validate if it'ss a valid yaml document.

I need an access token to use sloctl and create resources in Nobl9. How can I handle authorization in a CI/CD flow if I donโ€™t want to bind personal access tokens into a pipeline code? Is there any mechanism to get project-level credentials and use them in sloctl?โ€‹

  • You can create such user manually and use it to generate credentials in your CI/CD, check out our API Documentation . Nobl9 provides POST endpoint that you can use to get the token to be used by sloctl or with our annotations API. You have to replace the https://replace-me.nobl9.dev/api with the https://app.nobl9.com/api. Note that there's a CORS issue there that prevents you from testing the API directly through swagger. You should also cache these credentials early on and reuse them in the CI/CD steps, as calling this endpoint a lot might exhaust limits.