Skip to main content

Command reference

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

This page documents commands, their options, and examples.


Run sloctl [command] --help to list commands and options. Omit [command] to show global help.

Commands that access Nobl9 use the active configuration context. Use --context to select another context for one command, or --no-config-file to authenticate with environment variables only.

Global options

--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

apply

Apply Nobl9 resource definitions from one or more YAML or JSON sources.

With --replay, Replay runs only for applied SLOs. Replay is skipped during --dry-run, and applied changes are not rolled back if Replay fails.

Use --file for each input source. A source can be a local file, directory, URL, standard input (-), or glob pattern. Directories are read one level deep; use ** in a glob to match recursively.

Globs follow Go's filepath.Match syntax with added ** support. Directory and glob sources include only .yaml, .yml and .json files with a Nobl9 apiVersion; unrelated files are skipped. Before processing file contents, sloctl checks for a Nobl9 API version with the regular expression "?apiVersion"?\s*:\s*"?n9. An explicit file without a Nobl9 apiVersion is rejected. Quote glob patterns so the shell does not expand them before sloctl receives them.

For confirmation-prompt settings, see Customizing timeout and file prompts.

--dry-run with --replay

When both flags are set, sloctl validates the resources without starting Replay.

sloctl apply [flags]

Examples

# Apply the configuration from slo.yaml.
sloctl apply -f ./slo.yaml

# Preview an apply without persisting changes.
sloctl apply -f ./slo.yaml --dry-run

# Apply resources from multiple different sources at once.
sloctl apply -f ./slo.yaml -f test/config.yaml -f https://nobl9.com/slo.yaml

# Apply the YAML or JSON passed directly into stdin.
sloctl apply -f - <slo.yaml

# Apply the configuration from slo.yaml and set project if it is not defined in file.
sloctl apply -f ./slo.yaml -p slo

# Apply the configurations from all the files located at cwd recursively.
sloctl apply -f '**'

# Apply the configurations from files with 'annotations' name within the whole directory tree.
sloctl apply -f '**/annotations*'

# Apply the SLO(s) from slo.yaml and import its/their data from 2023-03-02T15:00:00Z until now.
sloctl apply -f ./slo.yaml --replay --from=2023-03-02T15:00:00Z

Options

--dry-run
Send the request without persisting changes.
-f, --file stringArray
Path, directory, URL, glob pattern, or - for YAML or JSON from standard input. Repeat this flag to use multiple sources.
--from time
Start Replay at this RFC3339 timestamp. Must be used with --replay.
-p, --project string
Use this project for project-scoped definitions that omit metadata.project; definitions specifying another project are rejected.
--replay
Run Replay for each applied SLO. Applied changes are not rolled back if Replay fails.
-y, --yes
Skip the file-count confirmation prompt. By default, the prompt appears when a directory or glob resolves to more than 23 files. Configure filesPromptEnabled and filesPromptThreshold in the [sloctl] section of config.toml, or set SLOCTL_FILES_PROMPT_ENABLED and SLOCTL_FILES_PROMPT_THRESHOLD.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

aws-iam-ids

Get the AWS identifiers used to configure IAM roles for Direct data sources and data exports.

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

dataexport

Return the AWS external ID that Nobl9 uses to assume a data export IAM role.

sloctl aws-iam-ids dataexport [flags]

Examples

sloctl aws-iam-ids dataexport
sloctl aws-iam-ids dataexport --output json

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

direct

Return the AWS external ID and Nobl9 AWS account ID for the named Direct data source in the active Project. Use these values to configure a cross-account IAM role. The response contains the externalID and accountID fields.

sloctl aws-iam-ids direct <direct-name> [flags]

Examples

sloctl aws-iam-ids direct my-cloudwatch-source
sloctl aws-iam-ids direct my-cloudwatch-source --output json

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

budgetadjustments

Manage events associated with budget adjustments.

Options

-h, --help
Help for budgetadjustments.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

events

Manage event occurrences associated with budget adjustments. These commands do not modify budget adjustment definitions.

For event concepts, filters, and response details, see Using sloctl with budget adjustments.

Options

-h, --help
Help for events.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

delete

Delete past events for one budget adjustment. Only events that ended within the last 30 days can be deleted. Deletions recalculate affected SLO error budgets and can alter reliability reports.

Provide YAML input from a local file or standard input. Separate multiple YAML documents with ---.

sloctl budgetadjustments events delete [flags]

Examples

# Delete Adjustment Events using a file:
cat <<EOF > ./events.yaml
- eventStart: 2024-10-24T04:07:04Z
  eventEnd: 2024-10-24T05:27:04Z
  slos:
  - project: test-project
    name: sample-slo-1
- eventStart: 2024-10-25T04:07:04Z
  eventEnd: 2024-10-25T05:27:04Z
  slos:
  - project: test-project
    name: sample-slo-2
EOF
sloctl budgetadjustments events delete --adjustment-name=sample-adjustment-name -f ./events.yaml

# Delete Adjustment Events using stdin:
sloctl budgetadjustments events delete --adjustment-name=sample-adjustment-name -f - <./events.yaml

Options

--adjustment-name string
Name of the budget adjustment.
-f, --file string
Path to a YAML event definition file, or - to read from standard input.
-h, --help
Help for events.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

get

Get past and ongoing events for one budget adjustment in a required RFC3339 time range. Results are ordered by event start time and limited to 250 events.

Use --slo-name together with --slo-project to filter by one SLO. Each matching event includes its associated SLOs.

sloctl budgetadjustments events get [flags]

Examples

# Get Adjustment Events for 'sample-adjustment-name' from 2024-09-23T00:45:00 UTC to 2024-09-23T20:46:00 UTC.
sloctl budgetadjustments events get --adjustment-name=sample-adjustment-name --from=2024-09-23T00:45:00Z --to=2024-09-23T20:46:00Z


# Get Adjustment Events for 'sample-adjustment-name' from 2024-09-23T00:45:00 UTC to 2024-09-23T20:46:00 UTC
# only for one slo with sloName and project filters.
sloctl budgetadjustments events get \
  --adjustment-name=sample-adjustment-name \
  --from=2024-09-23T00:45:00Z \
  --to=2024-09-23T20:46:00Z \
  --slo-project=sample-project-name \
  --slo-name=sample-slo-name

Options

--adjustment-name string
Name of the budget adjustment.
--from time
Start of the query range in RFC3339 format.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
--slo-name string
SLO name to filter by. Must be used with --slo-project.
--slo-project string
Project of the SLO to filter by. Must be used with --slo-name.
--to time
End of the query range in RFC3339 format.
-h, --help
Help for events.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

update

Update past events for one budget adjustment. Only events that ended within the last 30 days can be updated. Updates recalculate affected SLO error budgets and can alter reliability reports.

Provide YAML input from a local file or standard input. Identify each event by its existing timestamps and SLOs, and provide the replacement timestamps under update. Separate multiple YAML documents with ---.

For supported event changes, limits, and YAML examples, see Using sloctl with budget adjustments.

sloctl budgetadjustments events update [flags]

Examples

# Update Adjustment Events using a file:
cat <<EOF > ./events.yaml
- eventStart: 2024-10-24T04:07:04Z
  eventEnd: 2024-10-24T05:27:04Z
  slos:
  - project: test-project
    name: sample-slo-1
  update:
    eventStart: 2024-10-24T03:07:04Z
    eventEnd: 2024-10-24T04:27:04Z
- eventStart: 2024-10-25T04:07:04Z
  eventEnd: 2024-10-25T05:27:04Z
  slos:
  - project: test-project
    name: sample-slo-2
  update:
    eventStart: 2024-10-25T03:07:04Z
    eventEnd: 2024-10-25T04:27:04Z
EOF
sloctl budgetadjustments events update --adjustment-name=sample-adjustment-name -f ./events.yaml

# Update Adjustment Events using stdin:
sloctl budgetadjustments events update --adjustment-name=sample-adjustment-name -f - <./events.yaml

Options

--adjustment-name string
Name of the budget adjustment.
-f, --file string
Path to a YAML event definition file, or - to read from standard input.
-h, --help
Help for events.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

completion

Generate a completion script for Bash, fish, PowerShell, or Zsh. Choose a shell subcommand for loading and installation instructions.

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

bash

Generate a Bash completion script. Install the bash-completion package first.

Load completions in the current shell:

source <(sloctl completion bash)

Install completions for future sessions on Linux:

sloctl completion bash > /etc/bash_completion.d/sloctl

With Homebrew on macOS:

sloctl completion bash > "$(brew --prefix)/etc/bash_completion.d/sloctl"
sloctl completion bash

Options

--no-descriptions
disable completion descriptions
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

fish

Generate a fish completion script.

Load completions in the current shell:

sloctl completion fish | source

Install completions for future sessions:

sloctl completion fish > ~/.config/fish/completions/sloctl.fish
sloctl completion fish [flags]

Options

--no-descriptions
disable completion descriptions
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

powershell

Generate a PowerShell completion script.

Load completions in the current shell:

sloctl completion powershell | Out-String | Invoke-Expression

To persist completions, add that command to your PowerShell profile.

sloctl completion powershell [flags]

Options

--no-descriptions
disable completion descriptions
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

zsh

Generate a Zsh completion script.

Enable completion in ~/.zshrc if needed:

autoload -U compinit
compinit

Load completions in the current shell:

source <(sloctl completion zsh)

Install completions for future sessions on Linux:

sloctl completion zsh > "${fpath[1]}/_sloctl"

With Homebrew on macOS:

sloctl completion zsh > "$(brew --prefix)/share/zsh/site-functions/_sloctl"
sloctl completion zsh [flags]

Options

--no-descriptions
disable completion descriptions
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

config

Manage authentication contexts stored in the sloctl configuration file.

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

add-context

Add a context through an interactive form. The form collects credentials, the Nobl9 instance, and a default Project. If the configuration contains no contexts, the new context becomes the default. Otherwise, choose whether to make it the default.

sloctl config add-context [flags]

Examples

# Add a context interactively.
sloctl config add-context

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

current-context

Print the default context name. With --verbose, print its configuration. By default, the client secret is masked and the access token is omitted. --show-secret prints configured credentials without masking.

--output and --jq apply only to verbose output.

sloctl config current-context [flags]

Examples

# Print the default context name.
sloctl config current-context

# Print its masked configuration as JSON.
sloctl config current-context --verbose --output json

# Print unmasked credentials. Treat the output as sensitive.
sloctl config current-context --verbose --show-secret

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: toml, yaml, json, csv. (default yaml)
--show-secret
Display unmasked credentials (requires --verbose).
-v, --verbose
Display the current context configuration.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

current-user

Print the user ID associated with the active credentials. With --verbose, print the complete user record. --output and --jq apply only to verbose output.

sloctl config current-user [flags]

Examples

# Print the current user ID.
sloctl config current-user

# Print the complete user record as JSON.
sloctl config current-user --verbose --output json

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: toml, yaml, json, csv. (default yaml)
-v, --verbose
Display the complete user record.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

delete-context

Delete one or more contexts by name, or omit the names to use an interactive multi-select. The default context cannot be deleted; select another default context first.

sloctl config delete-context [context-name...] [flags]

Examples

# Delete contexts directly.
sloctl config delete-context old-context backup-context

# Delete contexts interactively.
sloctl config delete-context

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

get-contexts

List every context name, or only the names supplied as arguments. With --verbose, print the selected context configurations. Client secrets are masked and access tokens are omitted.

sloctl config get-contexts [context-name...] [flags]

Examples

# List all context names.
sloctl config get-contexts

# Print selected contexts as TOML.
sloctl config get-contexts development production --verbose --output toml

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: toml, yaml, json, csv. (default yaml)
-v, --verbose
Display context configuration details.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

rename-context

Rename one context by providing its existing and new names, or omit both names to use an interactive form. If the renamed context is the default, the new name remains the default.

sloctl config rename-context [old-name new-name] [flags]

Examples

# Rename a context directly.
sloctl config rename-context old-context new-context

# Rename a context interactively.
sloctl config rename-context

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

use-context

Set the default context by name, or omit the name to select a context interactively.

sloctl config use-context [context-name] [flags]

Examples

# Select a context interactively.
sloctl config use-context

# Set a context directly.
sloctl config use-context my-context

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

convert

Convert supported external resource definitions with a format-specific subcommand.

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

openslo

Convert OpenSLO YAML or JSON from files, directories, URLs, glob patterns, or standard input. Repeat --file to combine sources. Quote glob patterns to prevent shell expansion. Converted Nobl9 resources are written to standard output and can be piped to sloctl apply.

See nobl9-openslo for conversion rules and supported resources.

sloctl convert openslo [flags]

Examples

# Convert the OpenSLO definitions from service.yaml.
cat <<'EOF' > ./service.yaml
apiVersion: openslo/v1
kind: Service
metadata:
  annotations:
    nobl9.com/metadata.project: my-project
  name: example-service
spec:
  description: Example service description
EOF
sloctl convert openslo -f ./service.yaml

# Convert definitions from multiple different sources at once.
sloctl convert openslo -f ./service.yaml -f test/config.yaml

# Convert the YAML or JSON passed directly into stdin.
sloctl convert openslo -f - <service.yaml

# Convert definitions from all the files located at cwd recursively.
sloctl convert openslo -f '**'

# Convert definitions from files with 'data-sources' name within the whole directory tree.
sloctl convert openslo -f '**/data-sources*'

# Apply converted definitions in one step.
sloctl convert openslo -f ./service.yaml | sloctl apply -f -

Options

-f, --file stringArray
OpenSLO YAML or JSON source: file, directory, URL, glob pattern, or - for standard input. Repeat this flag to use multiple sources.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

delete

Delete resources described by one or more YAML or JSON sources. To delete resources by name, use a resource subcommand such as sloctl delete slos <name>.

Use --file for each input source. A source can be a local file, directory, URL, standard input (-), or glob pattern. Directories are read one level deep; use ** in a glob to match recursively.

Globs follow Go's filepath.Match syntax with added ** support. Directory and glob sources include only .yaml, .yml and .json files with a Nobl9 apiVersion; unrelated files are skipped. Before processing file contents, sloctl checks for a Nobl9 API version with the regular expression "?apiVersion"?\s*:\s*"?n9. An explicit file without a Nobl9 apiVersion is rejected. Quote glob patterns so the shell does not expand them before sloctl receives them.

sloctl delete [flags]

Examples

# Delete the configuration from slo.yaml.
sloctl delete -f ./slo.yaml

# Preview deletion without persisting changes.
sloctl delete -f ./slo.yaml --dry-run

# Delete resources from multiple different sources at once.
sloctl delete -f ./slo.yaml -f test/config.yaml -f https://nobl9.com/slo.yaml

# Delete the YAML or JSON passed directly into stdin.
sloctl delete -f - <slo.yaml

# Delete by passing in one or more resource names.
sloctl delete slo my-slo-name another-slo-name

# Delete the configuration from slo.yaml and set project context if it is not defined in file.
sloctl delete -f ./slo.yaml -p slo

# Delete the configurations from all the files located at cwd recursively.
sloctl delete -f '**'

# Delete the configurations from files with 'annotations' name within the whole directory tree.
sloctl delete -f '**/annotations*'

Options

--dry-run
Send the request without persisting changes.
-f, --file stringArray
Path, directory, URL, glob pattern, or - for YAML or JSON from standard input. Repeat this flag to use multiple sources.
-p, --project string
Use this project for project-scoped definitions that omit metadata.project; definitions specifying another project are rejected.
-y, --yes
Skip the file-count confirmation prompt. By default, the prompt appears when a directory or glob resolves to more than 23 files. Configure filesPromptEnabled and filesPromptThreshold in the [sloctl] section of config.toml, or set SLOCTL_FILES_PROMPT_ENABLED and SLOCTL_FILES_PROMPT_THRESHOLD.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

agents

Delete one or more agents by name. At least one name is required. Use --project to override the configured default project.

sloctl delete agents <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertmethods

Delete one or more alert methods by name. At least one name is required. Use --project to override the configured default project.

sloctl delete alertmethods <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertpolicies

Delete one or more alert policies by name. At least one name is required. Use --project to override the configured default project.

sloctl delete alertpolicies <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertsilences

Delete one or more alert silences by name. At least one name is required. Use --project to override the configured default project.

sloctl delete alertsilences <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

annotations

Delete one or more annotations by name. At least one name is required. Use --project to override the configured default project.

sloctl delete annotations <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

budgetadjustments

Delete one or more budget adjustments by name. At least one name is required.

sloctl delete budgetadjustments <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

dataexports

Delete one or more data exports by name. At least one name is required. Use --project to override the configured default project.

sloctl delete dataexports <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

directs

Delete one or more direct data sources by name. At least one name is required. Use --project to override the configured default project.

sloctl delete directs <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

projects

Delete one or more projects by name. At least one name is required.

sloctl delete projects <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

reports

Delete one or more reports by name. At least one name is required.

sloctl delete reports <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

rolebindings

Delete one or more role bindings by name. At least one name is required. Use --project to override the configured default project.

sloctl delete rolebindings <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

services

Delete one or more services by name. At least one name is required. Use --project to override the configured default project.

sloctl delete services <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

slos

Delete one or more SLOs by name. At least one name is required. Use --project to override the configured default project.

sloctl delete slos <name> [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
-p, --project string
Delete resources from this project instead of the configured default project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

edit

Edit resources from the default editor.

The edit command allows you to directly edit Nobl9 resources like SLOs or Alert Policies. Selected resources are written to a temporary YAML file before the editor opens. It will open the editor defined by your SLOCTL_EDITOR or EDITOR environment variables. SLOCTL_EDITOR takes precedence over EDITOR. If neither is defined, it falls back to:

  • notepad for Windows
  • The first available editor from vim, vi, nano for Unix systems, including macOS

When opening the editor, sloctl first uses the shell defined in the SHELL environment variable. If this is not defined, the default shell is /bin/bash for Unix systems or cmd for Windows.

Saving an empty or unchanged file cancels the operation. Removing a resource from the file does not delete it. You cannot change its kind, name, or project. Invalid YAML or server errors reopen the editor with error details.

If the editor fails, sloctl preserves the temporary file and prints its path. It also preserves the file and prints its path if you abandon invalid changes without fixing or reverting them.

Examples

# Edit one SLO from your default Project.
sloctl edit slo my-slo

# Use an alternative editor.
SLOCTL_EDITOR="nano" sloctl edit project default

# Edit one Service from a specific Project.
sloctl edit service my-service -p my-project

# Edit multiple Alert Policies in one session.
sloctl edit alertpolicy policy-a policy-b

# Preview edited changes without persisting them.
sloctl edit service my-service -p my-project --dry-run

Options

--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

agents

Select one agent by name and open it for editing. If the selection resolves to more than one agent, the command fails. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit agents [name] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertmethods

Select alert methods by name or available filters and open them for editing. Without names, all matching alert methods are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit alertmethods [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertpolicies

Select alert policies by name or available filters and open them for editing. Without names, all matching alert policies are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit alertpolicies [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertsilences

Select alert silences by name or available filters and open them for editing. Without names, all matching alert silences are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit alertsilences [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

annotations

Select annotations by name or available filters and open them for editing. Without names, all matching annotations are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit annotations [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
--category stringArray
Filter by annotation category (one of: Comment, ReviewNote, SloEdit, Alert, Adjustment, NoDataAnomaly, IncrementalMismatchAnomaly, NoBurnAnomaly, ConstantBurnAnomaly, GoodOverTotalAnomaly). Repeat to select multiple categories.
--from time
Filter annotations whose spec.startTime is at or after this RFC3339 timestamp.
-p, --project string
Select resources from this project instead of the configured default project.
--slo string
Filter annotations by SLO name.
--system
Include annotations in system categories.
--to time
Filter annotations whose spec.endTime is at or before this RFC3339 timestamp.
--user
Include annotations in user categories.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

budgetadjustments

Select budget adjustments by name or available filters and open them for editing. Without names, all matching budget adjustments are opened. --project and --slo must be supplied together when filtering by SLO. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit budgetadjustments [name...] [flags]

Options

-p, --project string
Filter budget adjustments by SLO project. Must be used with --slo.
--slo string
Filter budget adjustments by SLO name. Must be used with --project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

dataexports

Select data exports by name or available filters and open them for editing. Without names, all matching data exports are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit dataexports [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

directs

Select direct data sources by name or available filters and open them for editing. Without names, all matching direct data sources are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit directs [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

projects

Select projects by name or available filters and open them for editing. Without names, all matching projects are opened. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit projects [name...] [flags]

Options

-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

reports

Select reports by name or available filters and open them for editing. Without names, all matching reports are opened. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit reports [name...] [flags]

Options

--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

rolebindings

Select role bindings by name or available filters and open them for editing. Without names, all matching role bindings are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit rolebindings [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

services

Select services by name or available filters and open them for editing. Without names, all matching services are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit services [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

slos

Select SLOs by name or available filters and open them for editing. Without names, all matching SLOs are opened. Use --project to select a project or --all-projects to select across projects. Run sloctl edit --help for editor selection and failure safeguards.

sloctl edit slos [name...] [flags]

Options

-A, --all-projects
Select resources to edit across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
-s, --service stringArray
Filter SLOs by service name. Repeat to select multiple services.
--dry-run
Send the request without persisting changes.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

get

Get resources by name or filter and print them as YAML, JSON, or CSV. YAML is the default.

Resource names can be supplied as arguments or read from standard input. Without names, each resource command returns all resources matching its filters. Use --jq to filter or transform the results.

Examples

# Get every SLO in the configured default project.
sloctl get slos

# Get selected SLOs as JSON.
sloctl get slos availability latency --project my-project --output json

# Read resource names from standard input.
printf '%s\n' availability latency | sloctl get slos --project my-project

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

agents

Get agents by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching agents are returned. Use --project to select a project or --all-projects to search all projects.

--with-keys includes client_id and client_secret in the output and performs one additional credential request for every returned agent.

sloctl get agents [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-k, --with-keys
Include agent client_id and client_secret values. This performs one additional credential request per returned agent.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertmethods

Get alert methods by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching alert methods are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get alertmethods [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertpolicies

Get alert policies by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching alert policies are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get alertpolicies [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alerts

Get alerts by ID or filter. Alert IDs can also be read from standard input. Repeat the same filter to match any supplied value; different filters are combined.

Active and resolved alerts are both included by default. Set --resolved=false or --triggered=false to select only one status.

A filter can return no alerts when a referenced Alert Policy, SLO, Service, or Objective was deleted. Recreating a resource with the same name does not restore its old alerts. Unlinking an Alert Policy from an SLO can also hide related alerts.

Alert output includes these timing and resolution fields:

  • spec.conditions[].status.firstMetMetricTime: when the condition first became true.
  • spec.conditions[].status.lastsForMetMetricTime: when the required lastsFor duration was met.
  • spec.conditions[].status.lastMetMetricTime: the last time the condition remained true.
  • spec.coolDownStartedAtMetricTime: when the cooldown started for a resolved alert.
  • spec.resolutionReason: why the alert was resolved or canceled.

Results may be truncated by the API. If sloctl reports truncation, use narrower filters.

For alert lifecycle concepts and the web interface, see Alert details.

The command response includes condition timing, cooldown timing, and the reason an alert was resolved or canceled.

sloctl get alerts [id...] [flags]

Examples

# Get active and resolved alerts from all projects.
sloctl get alert -A

# Get only active (not resolved yet) alerts.
sloctl get alert --triggered --resolved=false -A

# Get only resolved alerts.
sloctl get alert --resolved --triggered=false -A

# Get a specific alert by the alert ID.
sloctl get alert ce1a2a10-d74d-477f-b574-b278ee54e02b -A

# Get alerts related to the reportsapi service or usersapi service in project prod.
sloctl get alert --service reportsapi --service usersapi -p prod

# Get only resolved alerts for the specific alert policy and SLO in the specified project.
sloctl get alert --resolved --triggered=false --alert-policy slow-burn --slo usersapi-latency -p prod

# Get alerts triggered for the slo usersapi-availability AND objective objective-1 in project prod.
sloctl get alert --slo usersapi-availability --objective objective-1 -p prod

# Get alerts for slo usersapi-latency AND either objective-1 OR objective-2 in project prod.
sloctl get alert --slo usersapi-latency --objective objective-1 --objective objective-2 -p prod

# Get alerts by a time range.
# We're assuming the current date is 2023-03-23T12:00:00Z:
# - Alerts that were active yesterday:
sloctl get alert --from 2023-03-22T00:00:00Z --to 2023-03-22T23:59:59Z -A
# - Alerts that have been active since yesterday:
sloctl get alert --from 2023-03-22T00:00:00Z -A
# - Alerts that have been active until today:
sloctl get alert --to 2023-03-23T00:00:00Z -A

Options

--alert-policy stringArray
Filter by alert policy name. Repeat to match any of several policies.
--slo stringArray
Filter by SLO name. Repeat to match any of several SLOs.
--objective stringArray
Filter by objective name. Repeat to match any of several objectives.
--service stringArray
Filter by service name. Repeat to match any of several services.
--resolved
Include resolved alerts. Set --resolved=false to exclude them. (default true)
--triggered
Include active alerts. Set --triggered=false to exclude them. (default true)
--from time
Set the start of the alert metric-time range in RFC3339 format.
--to time
Set the end of the alert metric-time range in RFC3339 format.
-p, --project string
Select resources from this project instead of the configured default project.
-A, --all-projects
Select resources across all projects.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

alertsilences

Get alert silences by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching alert silences are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get alertsilences [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

annotations

Get annotations by name or filter. Pass names as arguments or through standard input. Without a category selector, this command returns only user categories (Comment, ReviewNote). Use --system, --user, or repeated --category flags to select other categories.

Annotation category origins:

  • Comment: added manually to an SLO.
  • ReviewNote: created when an SLO review status changes.
  • SloEdit: created when an SLO definition changes.

See Annotation types.

For the categories returned in spec.category, see SLO annotation types.

sloctl get annotations [name...] [flags]

Examples

# Get all user annotations from all projects.
sloctl get annotations -A

# Get a specific annotation by the annotation name in 'non-default' project.
sloctl get annotation ce1a2a10-d74d-477f-b574-b278ee54e02b -p non-default

# Get all user annotations for 'my-slo' SLO in 'custom' project.
sloctl get annotation -p custom --slo=my-slo

# Get annotations from your default project which mark SLO edits and reviews.
sloctl get annotations --category=SloEdit --category=ReviewNote

# Get all system annotations from all projects.
sloctl get annotations -A --system

# Get all annotations (both system and user) from all projects.
sloctl get annotations -A --system --user

# Filter user annotations by their start and end times.
# `--from` requires `spec.startTime` at or after the specified timestamp.
# `--to` requires `spec.endTime` at or before the specified timestamp.
#
# We're assuming the current date is 2023-03-23T12:00:00Z.
# - Annotations that apply only to yesterday:
sloctl get annotation --from 2023-03-22T00:00:00Z --to 2023-03-22T23:59:59Z -A
# - Annotations that start at or after yesterday (no upper bound):
sloctl get annotation --from 2023-03-22T00:00:00Z -A
# - Annotations that end at or before today (no lower bound):
sloctl get annotation --to 2023-03-23T00:00:00Z -A

Options

-A, --all-projects
Select resources across all projects.
--category stringArray
Filter by annotation category (one of: Comment, ReviewNote, SloEdit, Alert, Adjustment, NoDataAnomaly, IncrementalMismatchAnomaly, NoBurnAnomaly, ConstantBurnAnomaly, GoodOverTotalAnomaly). Repeat to select multiple categories.
--from time
Filter annotations whose spec.startTime is at or after this RFC3339 timestamp.
-p, --project string
Select resources from this project instead of the configured default project.
--slo string
Filter annotations by SLO name.
--system
Include annotations in system categories.
--to time
Filter annotations whose spec.endTime is at or before this RFC3339 timestamp.
--user
Include annotations in user categories.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

budgetadjustments

Get budget adjustments by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching budget adjustments are returned. --project and --slo must be supplied together when filtering by SLO.

For filtering behavior and YAML examples, see Using sloctl with budget adjustments.

sloctl get budgetadjustments [name...] [flags]

Options

-p, --project string
Filter budget adjustments by SLO project. Must be used with --slo.
--slo string
Filter budget adjustments by SLO name. Must be used with --project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

dataexports

Get data exports by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching data exports are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get dataexports [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

directs

Get direct data sources by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching direct data sources are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get directs [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

projects

Get projects by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching projects are returned.

sloctl get projects [name...] [flags]

Options

-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

reports

Get reports by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching reports are returned.

sloctl get reports [name...] [flags]

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

rolebindings

Get role bindings by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching role bindings are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get rolebindings [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

services

Get services by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching services are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get services [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

slos

Get SLOs by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching SLOs are returned. Use --project to select a project or --all-projects to search all projects.

sloctl get slos [name...] [flags]

Options

-A, --all-projects
Select resources across all projects.
-l, --label stringArray
Filter by label. Repeat the flag or separate labels with commas, for example: team=platform,env=prod.
-p, --project string
Select resources from this project instead of the configured default project.
-s, --service stringArray
Filter SLOs by service name. Repeat to select multiple services.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

user

Get users by ID. IDs can be supplied as arguments or read from standard input. Without IDs, up to --limit users are returned; the default limit is 100.

sloctl get user [id...] [flags]

Options

--limit uint
Maximum number of users to return. The default limit applies when no IDs are provided. (default 100)
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

usergroups

Get user groups by name or available filters. Names can be supplied as arguments or read from standard input. Without names, all matching user groups are returned.

sloctl get usergroups [name...] [flags]

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

mcp

Start a Model Context Protocol (MCP) proxy over standard input and output. The proxy uses the active sloctl context to authenticate and forwards requests to Nobl9.

Use this proxy instead of a direct HTTP connection when the MCP client communicates over stdio, requires dynamic client registration, or should reuse credentials from the active sloctl context. See Nobl9 MCP server.

For client configuration and supported tools, see the Nobl9 MCP server guide.

sloctl mcp [flags]

Examples

sloctl mcp

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

move

Move SLOs to another Project or assign them to another Service within the same Project.

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

slo

Move the named SLOs from the Project selected by --project or the active configuration. If no SLO names are provided, every SLO in the source Project is moved.

Use --to-project for a cross-Project move. Use --to-service without --to-project to reassign SLOs within the source Project. Missing target Projects and Services are created. For a cross-Project move without --to-service, each SLO retains its source Service name.

Cross-Project moves:

  • Change SLO links, so previous links no longer work.
  • Remove SLOs from reports filtered by their previous paths.
  • Fail when SLOs have attached Alert Policies unless you detach the policies manually or with --detach-alert-policies.
  • Can make moved SLOs inaccessible to users without access to the target Project.

Nobl9 updates references to moved SLOs. Update local SLO-as-code definitions that reference moved SLOs in composite SLOs or Budget Adjustment filters.

sloctl move slo [slo-name...] [flags]

Examples

# Move 'slo-1' and 'slo-2' from your default Project to 'new-project'.
sloctl move slo slo-1 slo-2 --to-project=new-project

# Move 'slo-1' and 'slo-2' from 'old-project' to 'new-project'.
sloctl move slo slo-1 slo-2 -p old-project --to-project=new-project

# Move all SLOs from 'old-project' to 'new-project'.
sloctl move slo -p old-project --to-project=new-project

# Move 'slo-1' and 'slo-2' from 'old-project' to 'new-project' and
# assign 'my-service' in 'new-project' Project for the moved SLOs.
sloctl move slo slo-1 slo-2 -p old-project --to-service=my-service --to-project=new-project

# Move 'slo-1' and 'slo-2' from 'old-project' to 'new-project' and
# detach Alert Policies from both SLOs.
sloctl move slo slo-1 slo-2 -p old-project --detach-alert-policies --to-project=new-project

# Move 'slo-1' and 'slo-2' to 'new-service' within your default Project.
sloctl move slo slo-1 slo-2 --to-service=new-service

# Move 'slo-1' to 'my-service', both the SLO and Service are in 'my-project'.
sloctl move slo slo-1 -p my-project --to-service=my-service

# Move all SLOs in 'my-project' to 'new-service' within the same Project.
sloctl move slo -p my-project --to-service=new-service

Options

--detach-alert-policies
Detach all Alert Policies from moved SLOs during a cross-Project move.
-p, --project string
Source Project. Defaults to the Project in the active configuration.
--to-project string
Target Project for a cross-Project move. Omit when moving within the source Project.
--to-service string
Target Service. Required for same-Project moves; for cross-Project moves, the source Service name is used when omitted.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

replay

Create Replay jobs to recalculate SLO error budgets from a specified start time until now. Replay is permanent and cannot be rolled back. A job can take several minutes to an hour.

To replay one SLO, pass its name and --from. The Project defaults to the active context's Project. To replay multiple SLOs, pass one or more local YAML or JSON configuration files with --file. Values in a file take precedence over --project and --from.

sloctl validates every requested SLO before starting any Replay. After preflight succeeds, a failure for one entry does not stop the remaining entries. Organizations with Replay queues enqueue the jobs; otherwise sloctl waits for each Replay to finish before starting the next. Modifying an SLO after its Replay starts does not change the running Replay.

See the Replay guide for data-source support, restrictions, and effects on connected resources.

sloctl replay [slo-name] [flags]

Examples

# Replay SLO 'my-slo' in Project 'my-project' data from 2023-03-02 15:00:00 UTC until now.
sloctl replay -p my-project --from=2023-03-02T15:00:00Z my-slo

# Replay SLOs using file configuration from replay.yaml
sloctl replay -f ./replay.yaml

# If the project is not set, it is inferred from Nobl9 config.toml for the current context.
# If 'from' is not provided in the config file, you must specify it with '--from' flag.
# Setting 'project' or 'from' via flags does not take precedence over the values set in config.
cat <<'EOF' > ./replay.yaml
- slo: prometheus-latency
  from: 2023-03-02T16:00:00Z
- slo: datadog-latency
  project: default
- slo: dynatrace-latency
  project: default
  from: 2023-03-02T16:00:00Z
EOF
sloctl replay -f ./replay.yaml --from=2023-03-02T15:00:00Z

# Minimal config with project and from set via flags.
cat <<'EOF' > ./replay.yaml
- slo: prometheus-latency
- slo: datadog-latency
EOF
sloctl replay -f ./replay.yaml -p my-project --from 2023-03-02T15:00:00Z

# Replay SLOs using SLI data from other SLOs.
cat <<'EOF' > ./replay.yaml
- slo: prometheus-latency
  project: default
  from: 2023-03-02T16:00:00Z
  sourceSLO:
    slo: my-service-latency
    project: my-service-test-project
    objectivesMap:
      - source: acceptable
        target: objective-1
      - source: alarming
        target: objective-2
- slo: datadog-latency
  project: default
  from: 2023-03-02T16:00:00Z
  sourceSLO:
    slo: my-service-latency
    project: my-service-test-project
    objectivesMap:
      - source: alarming
        target: objective-1
      - source: alarming
        target: objective-2
EOF
sloctl replay -f ./replay.yaml

Options

-f, --file stringArray
Path to a local YAML or JSON Replay configuration file. Repeat this flag to use multiple files.
--from time
Replay start time in RFC3339 format. Required for a single SLO and used for file entries that omit it.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
-p, --project string
Project for a single SLO, or fallback Project for file entries that omit it. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

cancel

Request cancellation of the data-import phase of the Replay for one SLO. The Project defaults to the active context's Project. This command does not remove a Replay that is still queued.

sloctl replay cancel <slo-name> [flags]

Examples

sloctl replay cancel my-slo --project my-project

Options

-p, --project string
Project containing the SLO. Defaults to the active context's Project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

delete

Remove one queued Replay, or remove every queued Replay across all Projects with --all. When an SLO name is provided, the Project defaults to the active context's Project. This command does not cancel a Replay that is already importing data.

sloctl replay delete [slo-name] [flags]

Examples

sloctl replay delete my-slo --project my-project
sloctl replay delete --all

Options

--all
Remove all queued Replays across all Projects.
-p, --project string
Project containing the SLO. Defaults to the active context's Project.
-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

list

List Replay queue entries and their current status across Projects. Use --output or --jq to format or filter the result.

sloctl replay list [flags]

Examples

sloctl replay list
sloctl replay list --output json

Options

-q, --jq string
Filter or transform command output using a jq expression.
-o, --output format
Output format: yaml, json, csv. (default yaml)
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

review

Manage SLO review.

This feature requires Nobl9 Enterprise Edition.

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

set-status

Change the review status of one SLO by selecting a status subcommand. The Project defaults to the active context's Project. The reviewed and skipped statuses accept an optional --note.

See SLO review status transitions for allowed manual and automatic transitions.

Examples

# Set "prometheus-latency" SLO (non-default Project) review status as "reviewed" and provide a review note.
sloctl review set-status reviewed prometheus-latency -p non-default -n "Target met, 20% error budget remaining"

# Set "prometheus-latency" SLO (default Project) review status as "skipped" and provide a note explaining the reason for skipping.
sloctl review set-status skipped prometheus-latency --note "Insufficient data for this period"

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

not-started

Set one SLO's review status to notStarted. The Project defaults to the active context's Project. Available only when the SLO's Service has no review schedule.

This feature requires Nobl9 Enterprise Edition.

sloctl review set-status not-started <slo-name> [flags]

Options

-p, --project string
Project containing the SLO. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

overdue

Set one SLO's review status to overdue. The Project defaults to the active context's Project. Available only when the SLO's Service has a review schedule.

This feature requires Nobl9 Enterprise Edition.

sloctl review set-status overdue <slo-name> [flags]

Options

-p, --project string
Project containing the SLO. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

reviewed

Set one SLO's review status to reviewed. The Project defaults to the active context's Project. Available whether or not the SLO's Service has a review schedule. Use --note to attach context to the decision.

This feature requires Nobl9 Enterprise Edition.

sloctl review set-status reviewed <slo-name> [flags]

Options

-n, --note string
Note to attach to the review decision.
-p, --project string
Project containing the SLO. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

skipped

Set one SLO's review status to skipped. The Project defaults to the active context's Project. Available only when the SLO's Service has a review schedule. Use --note to attach context to the decision.

This feature requires Nobl9 Enterprise Edition.

sloctl review set-status skipped <slo-name> [flags]

Options

-n, --note string
Note to attach to the review decision.
-p, --project string
Project containing the SLO. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

to-review

Set one SLO's review status to toReview. The Project defaults to the active context's Project. Available only when the SLO's Service has a review schedule.

This feature requires Nobl9 Enterprise Edition.

sloctl review set-status to-review <slo-name> [flags]

Options

-p, --project string
Project containing the SLO. Defaults to the active context's Project.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

validate

Validate the SLI queries defined by existing SLOs or local SLO manifests.

sloctl validate [flags]

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

sli

Query the data source configured by an SLO and return the values produced by each SLI query.

Provide either an existing SLO name or one or more SLO manifests with --file. For file input, use --slo and --objective to limit validation.

The default time range is the last 15 minutes, and a range cannot exceed one hour. At most 50 SLI queries can be validated at once. Query failures are reported and cause a non-zero exit status.

sloctl validate sli [slo-name] [flags]

Examples

# Validate all SLI queries for an existing SLO in the default Project.
sloctl validate sli checkout

# Validate one objective from a manifest over the last 30 minutes.
sloctl validate sli --file ./slo.yaml --slo checkout --objective availability --last 30m

# Validate an explicit time range and return JSON.
sloctl validate sli checkout --from 2026-07-02T10:00:00Z --to 2026-07-02T10:30:00Z --output json

Options

-f, --file stringArray
Path, directory, URL, glob pattern, or - for YAML or JSON from standard input. Repeat this flag to use multiple sources.
--from time
Start of the validation time range.
-q, --jq string
Filter or transform command output using a jq expression.
--last duration
Validation time range ending now. Maximum value is 1h. (default 15m0s)
--objective string
Validate only the named objective.
-o, --output format
Output format: yaml, json, csv. (default yaml)
-p, --project string
Project of an SLO selected by name, or the default Project for file definitions that omit one. Project names specified in file definitions must match this value.
--slo string
Select one SLO by name from file input.
--to time
End of the validation time range.
Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.

version

Print the sloctl version, Git branch and revision, operating system, architecture, and Go runtime version.

sloctl version [flags]

Examples

sloctl version

Options

Inherited options
--config string
Path to config.toml. If unset, use SLOCTL_CONFIG_FILE_PATH or the platform default.
-c, --context string
Use this context instead of the configured default for the selected command.
-h, --help
Help for sloctl.
--no-config-file
For API authentication, use SLOCTL_CLIENT_ID and SLOCTL_CLIENT_SECRET without reading or creating config.toml. Configuration commands still access the file.