diff --git a/Makefile b/Makefile index f3bb67b..3860da6 100644 --- a/Makefile +++ b/Makefile @@ -159,15 +159,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 diff --git a/cmd/sloctl/main.go b/cmd/sloctl/main.go index ed0f24a..b8da819 100644 --- a/cmd/sloctl/main.go +++ b/cmd/sloctl/main.go @@ -5,8 +5,15 @@ // example configuration file can be found in this repository samples/config.toml. package main -import "github.com/nobl9/sloctl/internal" +import ( + "os" + + "github.com/nobl9/sloctl/internal" +) func main() { - internal.Execute() + cmd := internal.NewRootCmd() + if err := cmd.Execute(); err != nil { + os.Exit(1) + } } diff --git a/docs/sloctl.md b/docs/sloctl.md new file mode 100644 index 0000000..6be1f10 --- /dev/null +++ b/docs/sloctl.md @@ -0,0 +1,32 @@ +## 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 definitions of SLO in YAML files. +For every command more detailed help is available. + +### Options + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### 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 config](sloctl_config.md) - Configuration management +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file +* [sloctl get](sloctl_get.md) - Display one or more than one resource +* [sloctl replay](sloctl_replay.md) - Retrieve historical SLI data and recalculate their SLO error budgets. +* [sloctl version](sloctl_version.md) - Print the sloctl version + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_apply.md b/docs/sloctl_apply.md new file mode 100644 index 0000000..7ba7dd7 --- /dev/null +++ b/docs/sloctl_apply.md @@ -0,0 +1,70 @@ +## 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. +cat slo.yaml | sloctl apply -f - + +# 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. + -h, --help help for apply + --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 + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily. + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_aws-iam-ids.md b/docs/sloctl_aws-iam-ids.md new file mode 100644 index 0000000..3646282 --- /dev/null +++ b/docs/sloctl_aws-iam-ids.md @@ -0,0 +1,27 @@ +## sloctl aws-iam-ids + +Returns IAM IDs used in AWS integrations + +### Options + +``` + -h, --help help for aws-iam-ids +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### 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 2-Aug-2024 diff --git a/docs/sloctl_aws-iam-ids_dataexport.md b/docs/sloctl_aws-iam-ids_dataexport.md new file mode 100644 index 0000000..9feb346 --- /dev/null +++ b/docs/sloctl_aws-iam-ids_dataexport.md @@ -0,0 +1,29 @@ +## 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 + +``` + -h, --help help for dataexport +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl aws-iam-ids](sloctl_aws-iam-ids.md) - Returns IAM IDs used in AWS integrations + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_aws-iam-ids_direct.md b/docs/sloctl_aws-iam-ids_direct.md new file mode 100644 index 0000000..b3c71bc --- /dev/null +++ b/docs/sloctl_aws-iam-ids_direct.md @@ -0,0 +1,37 @@ +## 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 + +``` + --field-separator string Field Separator for CSV. (default ",") + -h, --help help for direct + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + --record-separator string Record Separator for CSV. (default "\n") +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl aws-iam-ids](sloctl_aws-iam-ids.md) - Returns IAM IDs used in AWS integrations + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config.md b/docs/sloctl_config.md new file mode 100644 index 0000000..f0c787f --- /dev/null +++ b/docs/sloctl_config.md @@ -0,0 +1,35 @@ +## sloctl config + +Configuration management + +### Synopsis + +Manage configurations stored in configuration file. + +### Options + +``` + -h, --help help for config +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily. +* [sloctl config add-context](sloctl_config_add-context.md) - Add new sloctl configuration context +* [sloctl config current-context](sloctl_config_current-context.md) - Display current context +* [sloctl config delete-context](sloctl_config_delete-context.md) - Delete chosen context +* [sloctl config get-contexts](sloctl_config_get-contexts.md) - Display all available contexts +* [sloctl config rename-context](sloctl_config_rename-context.md) - Rename chosen context +* [sloctl config use-context](sloctl_config_use-context.md) - Set the default context + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_add-context.md b/docs/sloctl_config_add-context.md new file mode 100644 index 0000000..cb02cd9 --- /dev/null +++ b/docs/sloctl_config_add-context.md @@ -0,0 +1,33 @@ +## sloctl config add-context + +Add new sloctl configuration context + +### Synopsis + +Add new sloctl configuration context, an interactive command which collects parameters in wizard mode. + +``` +sloctl config add-context [flags] +``` + +### Options + +``` + -h, --help help for add-context +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_current-context.md b/docs/sloctl_config_current-context.md new file mode 100644 index 0000000..d3af079 --- /dev/null +++ b/docs/sloctl_config_current-context.md @@ -0,0 +1,34 @@ +## sloctl config current-context + +Display current context + +### Synopsis + +Display configuration for the current context set in the configuration file. + +``` +sloctl config current-context [flags] +``` + +### Options + +``` + -h, --help help for current-context + -v, --verbose Display verbose information about configuration +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_delete-context.md b/docs/sloctl_config_delete-context.md new file mode 100644 index 0000000..c0ec721 --- /dev/null +++ b/docs/sloctl_config_delete-context.md @@ -0,0 +1,39 @@ +## sloctl config delete-context + +Delete chosen context + +### Synopsis + +Delete one of the contexts in the configuration file. + +``` +sloctl config delete-context [flags] +``` + +### Examples + +``` + sloctl config delete-context [context-name] +``` + +### Options + +``` + -h, --help help for delete-context +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_get-contexts.md b/docs/sloctl_config_get-contexts.md new file mode 100644 index 0000000..691a50e --- /dev/null +++ b/docs/sloctl_config_get-contexts.md @@ -0,0 +1,34 @@ +## sloctl config get-contexts + +Display all available contexts + +### Synopsis + +Display all available contexts in the configuration file. + +``` +sloctl config get-contexts [flags] +``` + +### Options + +``` + -h, --help help for get-contexts + -v, --verbose Display verbose information about configuration +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_rename-context.md b/docs/sloctl_config_rename-context.md new file mode 100644 index 0000000..554064a --- /dev/null +++ b/docs/sloctl_config_rename-context.md @@ -0,0 +1,39 @@ +## sloctl config rename-context + +Rename chosen context + +### Synopsis + +Rename one of the contexts in the configuration file. + +``` +sloctl config rename-context [flags] +``` + +### Examples + +``` + sloctl config rename-context [oldContext] [newContext] +``` + +### Options + +``` + -h, --help help for rename-context +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_config_use-context.md b/docs/sloctl_config_use-context.md new file mode 100644 index 0000000..70088e8 --- /dev/null +++ b/docs/sloctl_config_use-context.md @@ -0,0 +1,33 @@ +## sloctl config use-context + +Set the default context + +### Synopsis + +Set a default context in the existing config file. + +``` +sloctl config use-context [context name] [flags] +``` + +### Options + +``` + -h, --help help for use-context +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl config](sloctl_config.md) - Configuration management + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete.md b/docs/sloctl_delete.md new file mode 100644 index 0000000..6c05e33 --- /dev/null +++ b/docs/sloctl_delete.md @@ -0,0 +1,80 @@ +## sloctl delete + +Delete object definition by name or definition file + +### Synopsis + +One or more definitions can be specified by name or provide a path to file with definitions to remove. +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 delete [flags] +``` + +### Examples + +``` +# Delete the configuration from slo.yaml. +sloctl delete -f ./slo.yaml + +# 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. +cat slo.yaml | sloctl delete -f - + +# Delete by passing in one or more resource names. +sloctl delete slo my-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 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. + -h, --help help for delete + -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 + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily. +* [sloctl delete agents](sloctl_delete_agents.md) - Delete the Agents. +* [sloctl delete alertmethods](sloctl_delete_alertmethods.md) - Delete the AlertMethods. +* [sloctl delete alertpolicies](sloctl_delete_alertpolicies.md) - Delete the AlertPolicies. +* [sloctl delete alertsilences](sloctl_delete_alertsilences.md) - Delete the AlertSilences. +* [sloctl delete annotations](sloctl_delete_annotations.md) - Delete the Annotations. +* [sloctl delete budgetadjustments](sloctl_delete_budgetadjustments.md) - Delete the BudgetAdjustments. +* [sloctl delete dataexports](sloctl_delete_dataexports.md) - Delete the DataExports. +* [sloctl delete directs](sloctl_delete_directs.md) - Delete the Directs. +* [sloctl delete projects](sloctl_delete_projects.md) - Delete the Projects. +* [sloctl delete rolebindings](sloctl_delete_rolebindings.md) - Delete the RoleBindings. +* [sloctl delete services](sloctl_delete_services.md) - Delete the Services. +* [sloctl delete slos](sloctl_delete_slos.md) - Delete the SLOs. + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_agents.md b/docs/sloctl_delete_agents.md new file mode 100644 index 0000000..4dc23ce --- /dev/null +++ b/docs/sloctl_delete_agents.md @@ -0,0 +1,30 @@ +## sloctl delete agents + +Delete the Agents. + +``` +sloctl delete agents [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for agents +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_alertmethods.md b/docs/sloctl_delete_alertmethods.md new file mode 100644 index 0000000..0c6009e --- /dev/null +++ b/docs/sloctl_delete_alertmethods.md @@ -0,0 +1,30 @@ +## sloctl delete alertmethods + +Delete the AlertMethods. + +``` +sloctl delete alertmethods [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for alertmethods +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_alertpolicies.md b/docs/sloctl_delete_alertpolicies.md new file mode 100644 index 0000000..2e461e0 --- /dev/null +++ b/docs/sloctl_delete_alertpolicies.md @@ -0,0 +1,30 @@ +## sloctl delete alertpolicies + +Delete the AlertPolicies. + +``` +sloctl delete alertpolicies [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for alertpolicies +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_alertsilences.md b/docs/sloctl_delete_alertsilences.md new file mode 100644 index 0000000..3555ae0 --- /dev/null +++ b/docs/sloctl_delete_alertsilences.md @@ -0,0 +1,30 @@ +## sloctl delete alertsilences + +Delete the AlertSilences. + +``` +sloctl delete alertsilences [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for alertsilences +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_annotations.md b/docs/sloctl_delete_annotations.md new file mode 100644 index 0000000..bf8f412 --- /dev/null +++ b/docs/sloctl_delete_annotations.md @@ -0,0 +1,30 @@ +## sloctl delete annotations + +Delete the Annotations. + +``` +sloctl delete annotations [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for annotations +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_budgetadjustments.md b/docs/sloctl_delete_budgetadjustments.md new file mode 100644 index 0000000..f73fa54 --- /dev/null +++ b/docs/sloctl_delete_budgetadjustments.md @@ -0,0 +1,30 @@ +## sloctl delete budgetadjustments + +Delete the BudgetAdjustments. + +``` +sloctl delete budgetadjustments [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for budgetadjustments +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_dataexports.md b/docs/sloctl_delete_dataexports.md new file mode 100644 index 0000000..c8fabe8 --- /dev/null +++ b/docs/sloctl_delete_dataexports.md @@ -0,0 +1,30 @@ +## sloctl delete dataexports + +Delete the DataExports. + +``` +sloctl delete dataexports [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for dataexports +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_directs.md b/docs/sloctl_delete_directs.md new file mode 100644 index 0000000..7d3a245 --- /dev/null +++ b/docs/sloctl_delete_directs.md @@ -0,0 +1,30 @@ +## sloctl delete directs + +Delete the Directs. + +``` +sloctl delete directs [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for directs +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_projects.md b/docs/sloctl_delete_projects.md new file mode 100644 index 0000000..cc84c62 --- /dev/null +++ b/docs/sloctl_delete_projects.md @@ -0,0 +1,30 @@ +## sloctl delete projects + +Delete the Projects. + +``` +sloctl delete projects [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for projects +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_rolebindings.md b/docs/sloctl_delete_rolebindings.md new file mode 100644 index 0000000..c522f62 --- /dev/null +++ b/docs/sloctl_delete_rolebindings.md @@ -0,0 +1,30 @@ +## sloctl delete rolebindings + +Delete the RoleBindings. + +``` +sloctl delete rolebindings [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for rolebindings +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_services.md b/docs/sloctl_delete_services.md new file mode 100644 index 0000000..dd6629d --- /dev/null +++ b/docs/sloctl_delete_services.md @@ -0,0 +1,30 @@ +## sloctl delete services + +Delete the Services. + +``` +sloctl delete services [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for services +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_delete_slos.md b/docs/sloctl_delete_slos.md new file mode 100644 index 0000000..e4b4833 --- /dev/null +++ b/docs/sloctl_delete_slos.md @@ -0,0 +1,30 @@ +## sloctl delete slos + +Delete the SLOs. + +``` +sloctl delete slos [flags] +``` + +### Options + +``` + --dry-run Submit server-side request without persisting the configured resources. + -h, --help help for slos +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl delete](sloctl_delete.md) - Delete object definition by name or definition file + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get.md b/docs/sloctl_get.md new file mode 100644 index 0000000..048cf19 --- /dev/null +++ b/docs/sloctl_get.md @@ -0,0 +1,47 @@ +## sloctl get + +Display one or more than one resource + +### Synopsis + +Prints a table of the most important information about the specified resources. +To get more details in output use one of the available flags. + +### Options + +``` + --field-separator string Field Separator for CSV. (default ",") + -h, --help help for get + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --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. + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl](sloctl.md) - Create, get and delete SLO definitions from command line easily. +* [sloctl get agents](sloctl_get_agents.md) - Displays all of the Agents. +* [sloctl get alertmethods](sloctl_get_alertmethods.md) - Displays all of the AlertMethods. +* [sloctl get alertpolicies](sloctl_get_alertpolicies.md) - Displays all of the AlertPolicies. +* [sloctl get alerts](sloctl_get_alerts.md) - Displays all of the Alerts. +* [sloctl get alertsilences](sloctl_get_alertsilences.md) - Displays all of the AlertSilences. +* [sloctl get annotations](sloctl_get_annotations.md) - Displays all of the Annotations. +* [sloctl get budgetadjustments](sloctl_get_budgetadjustments.md) - Displays all of the BudgetAdjustments. +* [sloctl get dataexports](sloctl_get_dataexports.md) - Displays all of the DataExports. +* [sloctl get directs](sloctl_get_directs.md) - Displays all of the Directs. +* [sloctl get projects](sloctl_get_projects.md) - Displays all of the Projects. +* [sloctl get rolebindings](sloctl_get_rolebindings.md) - Displays all of the RoleBindings. +* [sloctl get services](sloctl_get_services.md) - Displays all of the Services. +* [sloctl get slos](sloctl_get_slos.md) - Displays all of the SLOs. +* [sloctl get usergroups](sloctl_get_usergroups.md) - Displays all of the UserGroups. + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_agents.md b/docs/sloctl_get_agents.md new file mode 100644 index 0000000..71001f8 --- /dev/null +++ b/docs/sloctl_get_agents.md @@ -0,0 +1,33 @@ +## sloctl get agents + +Displays all of the Agents. + +``` +sloctl get agents [flags] +``` + +### Options + +``` + -h, --help help for agents + -k, --with-keys Displays client_secret and client_id. +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_alertmethods.md b/docs/sloctl_get_alertmethods.md new file mode 100644 index 0000000..2427624 --- /dev/null +++ b/docs/sloctl_get_alertmethods.md @@ -0,0 +1,32 @@ +## sloctl get alertmethods + +Displays all of the AlertMethods. + +``` +sloctl get alertmethods [flags] +``` + +### Options + +``` + -h, --help help for alertmethods +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_alertpolicies.md b/docs/sloctl_get_alertpolicies.md new file mode 100644 index 0000000..6cfd2a6 --- /dev/null +++ b/docs/sloctl_get_alertpolicies.md @@ -0,0 +1,32 @@ +## sloctl get alertpolicies + +Displays all of the AlertPolicies. + +``` +sloctl get alertpolicies [flags] +``` + +### Options + +``` + -h, --help help for alertpolicies +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_alerts.md b/docs/sloctl_get_alerts.md new file mode 100644 index 0000000..e14752e --- /dev/null +++ b/docs/sloctl_get_alerts.md @@ -0,0 +1,84 @@ +## sloctl get alerts + +Displays all of the Alerts. + +### Synopsis + +Get alerts based on search criteria. You can use specific criteria using flags to find alerts related to specific SLO, objective, service, alert policy, time range, or alert status. + +For example, you can use the same flag multiple times to find alerts triggered for a given SLO OR another SLO. Keep in mind that the different types of flags are linked by the AND logical operator. + +Only alerts triggered in given project only (alert project is the same as the SLO project). If you don't have permission to view SLO in a given project, alerts from that project will not be returned. + + + +``` +sloctl get alerts [flags] +``` + +### Examples + +``` +# Get all alerts triggered in my organization (max 1000). +sloctl get alert -A + +# Get only active (not resolved yet) alerts in my organization. +sloctl get alert --triggered -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 --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 triggered for slo usersapi-latency AND objective 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: +# - 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 yesterday and are still active now: +sloctl get alert --from 2023-03-22T00:00:00Z -A +# - Alerts that were active until today: +sloctl get alert --to 2023-03-22T00:00:00Z -A + +``` + +### Options + +``` + --alert-policy stringArray Get alerts triggered for a given alert policy (name) only. + --slo stringArray Get alerts triggered for a given SLO (name) only. + --objective stringArray Get alerts triggered for a given objective name of the SLO only. + --service stringArray Get alerts triggered for SLOs related to a given service only. + --resolved Get alerts that are resolved only. (default true) + --triggered Get alerts that are still active (not resolved yet) only. (default true) + --from from Get active alerts after from time only, based on metric timestamp (RFC3339), for example 2023-02-09T10:00:00Z. + --to to Get active alerts before to time only, based on metric timestamp (RFC3339), for example 2023-02-09T10:00:00Z. + -h, --help help for alerts +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_alertsilences.md b/docs/sloctl_get_alertsilences.md new file mode 100644 index 0000000..80f477a --- /dev/null +++ b/docs/sloctl_get_alertsilences.md @@ -0,0 +1,32 @@ +## sloctl get alertsilences + +Displays all of the AlertSilences. + +``` +sloctl get alertsilences [flags] +``` + +### Options + +``` + -h, --help help for alertsilences +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_annotations.md b/docs/sloctl_get_annotations.md new file mode 100644 index 0000000..2eb8879 --- /dev/null +++ b/docs/sloctl_get_annotations.md @@ -0,0 +1,32 @@ +## sloctl get annotations + +Displays all of the Annotations. + +``` +sloctl get annotations [flags] +``` + +### Options + +``` + -h, --help help for annotations +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_budgetadjustments.md b/docs/sloctl_get_budgetadjustments.md new file mode 100644 index 0000000..22c766a --- /dev/null +++ b/docs/sloctl_get_budgetadjustments.md @@ -0,0 +1,32 @@ +## sloctl get budgetadjustments + +Displays all of the BudgetAdjustments. + +``` +sloctl get budgetadjustments [flags] +``` + +### Options + +``` + -h, --help help for budgetadjustments +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_dataexports.md b/docs/sloctl_get_dataexports.md new file mode 100644 index 0000000..08a50bb --- /dev/null +++ b/docs/sloctl_get_dataexports.md @@ -0,0 +1,32 @@ +## sloctl get dataexports + +Displays all of the DataExports. + +``` +sloctl get dataexports [flags] +``` + +### Options + +``` + -h, --help help for dataexports +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_directs.md b/docs/sloctl_get_directs.md new file mode 100644 index 0000000..919ad93 --- /dev/null +++ b/docs/sloctl_get_directs.md @@ -0,0 +1,32 @@ +## sloctl get directs + +Displays all of the Directs. + +``` +sloctl get directs [flags] +``` + +### Options + +``` + -h, --help help for directs +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_projects.md b/docs/sloctl_get_projects.md new file mode 100644 index 0000000..56309f0 --- /dev/null +++ b/docs/sloctl_get_projects.md @@ -0,0 +1,32 @@ +## sloctl get projects + +Displays all of the Projects. + +``` +sloctl get projects [flags] +``` + +### Options + +``` + -h, --help help for projects +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_rolebindings.md b/docs/sloctl_get_rolebindings.md new file mode 100644 index 0000000..73a271b --- /dev/null +++ b/docs/sloctl_get_rolebindings.md @@ -0,0 +1,32 @@ +## sloctl get rolebindings + +Displays all of the RoleBindings. + +``` +sloctl get rolebindings [flags] +``` + +### Options + +``` + -h, --help help for rolebindings +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_services.md b/docs/sloctl_get_services.md new file mode 100644 index 0000000..2ac4101 --- /dev/null +++ b/docs/sloctl_get_services.md @@ -0,0 +1,32 @@ +## sloctl get services + +Displays all of the Services. + +``` +sloctl get services [flags] +``` + +### Options + +``` + -h, --help help for services +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_slos.md b/docs/sloctl_get_slos.md new file mode 100644 index 0000000..60dc3c6 --- /dev/null +++ b/docs/sloctl_get_slos.md @@ -0,0 +1,32 @@ +## sloctl get slos + +Displays all of the SLOs. + +``` +sloctl get slos [flags] +``` + +### Options + +``` + -h, --help help for slos +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_get_usergroups.md b/docs/sloctl_get_usergroups.md new file mode 100644 index 0000000..938e936 --- /dev/null +++ b/docs/sloctl_get_usergroups.md @@ -0,0 +1,32 @@ +## sloctl get usergroups + +Displays all of the UserGroups. + +``` +sloctl get usergroups [flags] +``` + +### Options + +``` + -h, --help help for usergroups +``` + +### Options inherited from parent commands + +``` + -A, --all-projects Displays the objects from all of the projects. + --config string Config file path. + -c, --context string Overrides the default context for the duration of the selected command. + --field-separator string Field Separator for CSV. (default ",") + -l, --label stringArray Filter resource by label. Example: key=value,key2=value2,key2=value3. + --no-config-file Don't create config.toml, operate only on env variables. + -o, --output string Output format: one of yaml|json|csv. (default "yaml") + -p, --project string Overrides the default project from active Delete for the duration of the selected command. +``` + +### SEE ALSO + +* [sloctl get](sloctl_get.md) - Display one or more than one resource + +###### Auto generated by spf13/cobra on 2-Aug-2024 diff --git a/docs/sloctl_replay.md b/docs/sloctl_replay.md new file mode 100644 index 0000000..d9d822b --- /dev/null +++ b/docs/sloctl_replay.md @@ -0,0 +1,70 @@ +## sloctl replay + +Retrieve historical SLI data and recalculate their SLO error budgets. + +### Synopsis + +Replay pulls in the historical data while your SLO collects new data in real-time. The historical and current data are merged, producing an error budget calculated for the entire period. Refer to https://docs.nobl9.com/Features/replay?_highlight=replay for more details on Replay. + +The 'replay' command allows you to import data for multiple SLOs in bulk. Before running the Replays it will verify if the SLOs you've provided are eligible for Replay. It will only run a single Replay simultaneously (current limit for concurrent Replays). When any Replay fails, it will attempt the import for the next SLO. Importing data takes time: Replay for a single SLO may take several minutes up to an hour. During that time, the command keeps on running, periodically checking the status of Replay. If you cancel the program execution at any time, the current Replay in progress will not be revoked. + +``` +sloctl replay [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 + +# Read the configuration from stdin. +sloctl replay <./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 <