Skip to main content

sloctl user guide

Reading time: 0 minute(s) (0 words)

Site reliability teams often deal with complex SLO tracking and management challenges. Nobl9's command-line interface, sloctl, emerges as a streamlined solution, offering a robust CLI tool that transforms how you monitor and analyze service performance by complementing Nobl9's reliability monitoring toolset. Use sloctl to connect data sources, set up alerting on SLI data, create, update, and manage multiple SLOs and objectives at once as part of CI/CD pipelines.

While the Nobl9 web interface provides an easy way to create and update SLOs, sloctl offers DevOps and SRE teams a systematic, code-driven approach to maintaining service reliability objectives with greater automation and precision.

Ready to start casting SLO spells with sloctl? 🪄

  1. Install sloctl.
  2. Configure sloctl.
  3. Dive deep into its capabilities.
  4. Learn more ways of leveraging the SLOs as code approach.

SLO automation with sloctl​

  • CI/CD integration: sloctl integrates seamlessly with CI/CD pipelines.
  • Version control: you can keep definitions of SLOs and other resources in your version control system.
  • Bulk operations: sloctl allows you to create or update multiple SLOs and other Nobl9 resources simultaneously.
  • Advanced configuration: sloctl provides access to advanced functionalities through YAML-based resource definitions, including (but not limited to):
    • Complex alert policies: with sloctl, you can define alert policies with any number and combination of alert conditions, exceeding the limitations of the Nobl9 Web UI (one condition of a type).
    • Credential retrieval: you can run the sloctl get agents --with-keys command to retrieve credentials for agents within your organization at any time.
  • Powerful filtering and transformation: use --jq flag when fetching object definitions and unlock the processing power of JSON Query language (jq).

Command overview​

This section summarizes the top-level sloctl commands. For a full API visit Command reference.

Incorrect context configuration

Check your current context credentials if sloctl returns the access token error:

Error: error getting new access token from the customer identity provider: cannot access the token, customer identity provider replied with 401 {"errorCode":"invalid_client","errorSummary":"Invalid value for 'client_id' parameter.","errorLink":"invalid_client","errorId":"oaejFe6MwoIRo200IuIj7Hp1g","errorCauses":[]}
CommandDescription
sloctl applyApply Nobl9 resource definitions
sloctl aws-iam-idsGet AWS IAM role identifiers
sloctl budgetadjustmentsManage budget adjustment events
sloctl completionGenerate shell completion scripts
sloctl configManage sloctl configuration contexts
sloctl convertConvert external definitions to Nobl9 resources
sloctl deleteDelete Nobl9 resources by name or definition file
sloctl editEdit Nobl9 resources in the configured editor
sloctl getGet Nobl9 resources
sloctl mcpStart the Nobl9 MCP proxy over stdio
sloctl moveMove SLOs between Projects or Services
sloctl replayReplay historical SLI data for existing SLOs
sloctl reviewManage SLO review
sloctl validateValidate SLI queries
sloctl versionPrint build and runtime version information
Check out these related guides and references: