Skip to main content

Step 3: Use sloctl commands

Reading time: 0 minute(s) (0 words)
See how to use sloctl commands.

Below, you can find a summary of all sloctl commands.

Root commands

The following are the available commands in sloctl. When entered on the command line they should all be preceded by sloctl; for example, sloctl delete.

CommandDescription
add-contextAdd a new sloctl configuration context.
applyApply a resource definition in YAML or JSON format.

sloctl apply supports glob patterns when using the -f flag. It extends it with the support of '**' for recursive reading of files and directories. For more information, refer to the sloctl user guide.
completionGenerate the autocompletion script for sloctl for the specified shell.
deleteDelete a resource definition (specified by name or definition file).

sloctl delete supports glob patterns when using the -f flag. It extends it with the support of '**' for recursive reading of files and directories. For more information, refer to the sloctl user guide.
getDisplay one or more resources.
helpGet help on any command.
replayGet historical data for an SLO.
use-contextSet the default context.
versionPrint the sloctl version.

Object arguments follow the [command] argument in the sloctl command line:

sloctl [command] [object]

You can use the root commands with the following objects:

ObjectDescription
agentsProvide a solution to metrics collection from external sources. In this solution, users deploy the agents.
alertmethodsAllow you to send alerts to specific notification engines or tools when an incident is triggered.
alertpoliciesDefine a set of conditions that, when met, cause an alert to be a sent to a predefined list of integrations.
alertsilencesSilence alerts for a defined period not to receive notifications when an alert event is triggered.
alertsAllow notifications to be sent about SLOs when certain conditions are met.
annotations1Allows you to add annotations and manage them on the SLO or SLO objective level.
dataexportsDefine a configuration to export your data from Nobl9.
directsProvide a SaaS solution to metrics collection from external sources.
projectsServe as workspaces for resources and provide a layer of isolation for resources in different projects.
rolebindingsAssign a user the permissions indicated in a role.
servicesServe as high-level groupings of SLOs.
slosDefine a set of target values for an SLO.

1 sloctl does not return system annotations. When applying the sloctl get annotation[s] command, sloctl will return only annotations created by the user.

Config commands

The following are the available config commands in sloctl. When entered in the command line they should all be preceded by sloctl config; for example, sloctl config use-context:

CommandDescription
add-contextAdd a new sloctl configuration context.
current-contextDisplay current context.
delete-contextDelete chosen context.
get-contextsDisplay all available contexts.
rename-contextRename chosen context.
use-contextSet the default context.

For more information, refer to sloctl user guide.

You can find the Nobl9 exemplary configurations in the .yaml format in the YAML guide.

Great, now you can configure your sloctl and get it going!