Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,20 @@ check/format:
$(call _print_step,Checking if files are formatted)
./scripts/check-formatting.sh

.PHONY: generate generate/code
.PHONY: generate generate/code generate/docs
## Auto generate files.
generate: generate/code
generate: generate/code generate/docs

## Generate Golang code.
generate/code:
echo "Generating Go code..."
go generate ./...

## Generate sloctl docs.
generate/docs:
echo "Generating sloctl docs..."
go run internal/cmd/docgen/main.go

.PHONY: format format/go format/cspell
## Format files.
format: format/go format/cspell
Expand Down
37 changes: 37 additions & 0 deletions docs/sloctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## sloctl

Create, get and delete SLO definitions from command line easily.

### Synopsis

All available commands for execution are listed below.
Use this tool to work with Nobl9 YAML configuration files (including, but not limited to SLOs).
More detailed help is available for each command.

### Options

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for sloctl.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl apply](sloctl_apply.md) - Apply object definition in YAML or JSON format
* [sloctl aws-iam-ids](sloctl_aws-iam-ids.md) - Returns IAM IDs used in AWS integrations
* [sloctl budgetadjustments](sloctl_budgetadjustments.md) - Budget adjustments management
* [sloctl config](sloctl_config.md) - Configuration management
* [sloctl convert](sloctl_convert.md) - Convert SLO definitions to Nobl9 configuration
* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file
* [sloctl edit](sloctl_edit.md) - Edit resources
* [sloctl get](sloctl_get.md) - Display one or more than one resource
* [sloctl mcp](sloctl_mcp.md) - Start the MCP proxy listening on stdio
* [sloctl move](sloctl_move.md) - Move objects between Projects.
* [sloctl replay](sloctl_replay.md) - Retrieve historical SLI data and recalculate their SLO error budgets.
* [sloctl review](sloctl_review.md) - Manage SLO review (Enterprise Edition only)
* [sloctl validate](sloctl_validate.md) - Validate Nobl9 resources.
* [sloctl version](sloctl_version.md) - Print the sloctl version

###### Auto generated by spf13/cobra on 3-Aug-2026
69 changes: 69 additions & 0 deletions docs/sloctl_apply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## sloctl apply

Apply object definition in YAML or JSON format

### Synopsis

The apply command commits the changes by sending the updates to the application.
Sloctl supports glob patterns when using '-f' flag, it uses the standard Go glob patterns grammar and extends it with support of '**' for recursive reading of files and directories.
The standard Go grammar can be found here: https://pkg.go.dev/path/filepath#Match.
Only files with extensions: '.yaml', '.yml' and '.json' are processed when using glob patterns.
Additionally, before processing the file contents, sloctl checks if it contains Nobl9 API version with the following regex: '"?apiVersion"?\s*:\s*"?n9'.
Remember that glob patterns must be quoted to prevent the shell from evaluating them.


```
sloctl apply [flags]
```

### Examples

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

# 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 Submit server-side request without persisting the configured resources.
-f, --file stringArray File path, glob pattern or a URL to the configuration in YAML or JSON format. This option can be used multiple times.
--from time Sets the start of Replay time window.
-p, --project string Assigns the provided Project to the resources if no Project is defined in the object's definition.
--replay Run Replay for the applied SLOs. If Replay fails, the applied changes are not rolled back.
-y, --yes Auto confirm files threshold prompt. Threshold can be changed or disabled in config.toml or via env variables.
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for sloctl.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily.

###### Auto generated by spf13/cobra on 3-Aug-2026
27 changes: 27 additions & 0 deletions docs/sloctl_aws-iam-ids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## sloctl aws-iam-ids

Returns IAM IDs used in AWS integrations

### Options

```
-q, --jq string jq expression used to filter command results
-o, --output format Output format: one of yaml|json|csv. (default yaml)
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for sloctl.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily.
* [sloctl aws-iam-ids dataexport](sloctl_aws-iam-ids_dataexport.md) - Returns AWS external ID, which will be used by Nobl9 to assume the IAM role when performing data export
* [sloctl aws-iam-ids direct](sloctl_aws-iam-ids_direct.md) - Returns external ID and AWS account ID for given direct name

###### Auto generated by spf13/cobra on 3-Aug-2026
24 changes: 24 additions & 0 deletions docs/sloctl_aws-iam-ids_dataexport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## sloctl aws-iam-ids dataexport

Returns AWS external ID, which will be used by Nobl9 to assume the IAM role when performing data export

```
sloctl aws-iam-ids dataexport [flags]
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for sloctl.
-q, --jq string jq expression used to filter command results
--no-config-file Don't create config.toml, operate only on env variables.
-o, --output format Output format: one of yaml|json|csv. (default yaml)
```

### SEE ALSO

* [sloctl aws-iam-ids](sloctl_aws-iam-ids.md) - Returns IAM IDs used in AWS integrations

###### Auto generated by spf13/cobra on 3-Aug-2026
29 changes: 29 additions & 0 deletions docs/sloctl_aws-iam-ids_direct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## sloctl aws-iam-ids direct

Returns external ID and AWS account ID for given direct name

### Synopsis

Returns external ID and AWS account ID that can be used to create cross-account IAM roles.
More details available at: https://docs.nobl9.com/Sources/Amazon_CloudWatch/#cross-account-iam-roles-new.

```
sloctl aws-iam-ids direct [direct-name] [flags]
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for sloctl.
-q, --jq string jq expression used to filter command results
--no-config-file Don't create config.toml, operate only on env variables.
-o, --output format Output format: one of yaml|json|csv. (default yaml)
```

### SEE ALSO

* [sloctl aws-iam-ids](sloctl_aws-iam-ids.md) - Returns IAM IDs used in AWS integrations

###### Auto generated by spf13/cobra on 3-Aug-2026
24 changes: 24 additions & 0 deletions docs/sloctl_budgetadjustments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## sloctl budgetadjustments

Budget adjustments management

### Options

```
-h, --help Help for budgetadjustments.
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily.
* [sloctl budgetadjustments events](sloctl_budgetadjustments_events.md) - Budget adjustments events management

###### Auto generated by spf13/cobra on 3-Aug-2026
30 changes: 30 additions & 0 deletions docs/sloctl_budgetadjustments_events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## sloctl budgetadjustments events

Budget adjustments events management

### Synopsis

The 'events' command allows you to manage events related to SLO error budget adjustments

### Options

```
-h, --help Help for events.
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl budgetadjustments](sloctl_budgetadjustments.md) - Budget adjustments management
* [sloctl budgetadjustments events delete](sloctl_budgetadjustments_events_delete.md) - Delete existing past events.
* [sloctl budgetadjustments events get](sloctl_budgetadjustments_events_get.md) - Return a list of events for given Adjustment with related SLOs
* [sloctl budgetadjustments events update](sloctl_budgetadjustments_events_update.md) - Update existing past events with new values. Values for eventStart and eventEnd are required.

###### Auto generated by spf13/cobra on 3-Aug-2026
52 changes: 52 additions & 0 deletions docs/sloctl_budgetadjustments_events_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## sloctl budgetadjustments events delete

Delete existing past events.

```
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 Adjustment.
-f, --file string File path to events definitions in YAML.
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for events.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl budgetadjustments events](sloctl_budgetadjustments_events.md) - Budget adjustments events management

###### Auto generated by spf13/cobra on 3-Aug-2026
56 changes: 56 additions & 0 deletions docs/sloctl_budgetadjustments_events_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## sloctl budgetadjustments events get

Return a list of events for given Adjustment with related SLOs

### Synopsis

Returns a list of events for the specified adjustment along with related **SLO**. This command returns past and ongoing events (events that have already started). The events 'get' command can return a maximum of 250 events. You can optionally filter for a specific SLO (only one). If an SLO is defined, only events for that SLO will be returned, but the results will also include other SLOs associated with those events. The results are sorted by event start time.

```
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 Adjustment.
--from time Specifies the start date and time for the data range (in UTC).
-q, --jq string jq expression used to filter command results
-o, --output format Output format: one of yaml|json|csv. (default yaml)
--slo-name string Name of the SLO. Required when sloName is defined.
--slo-project string Name of the project. Required when sloName is defined.
--to time Specifies the end date and time for the data range (in UTC).
```

### Options inherited from parent commands

```
--config string Config file path.
-c, --context string Overrides the default context for the duration of the selected command.
-h, --help Help for events.
--no-config-file Don't create config.toml, operate only on env variables.
```

### SEE ALSO

* [sloctl budgetadjustments events](sloctl_budgetadjustments_events.md) - Budget adjustments events management

###### Auto generated by spf13/cobra on 3-Aug-2026
Loading
Loading