StackState CLI
StackState Self-hosted v4.6.x
This page describes StackState version 4.6.
Overview
The StackState CLI can be used to configure StackState, work with data, and help with debugging problems. The CLI provides easy access to the functionality provided by the StackState API. The URLs and authentication credentials are configurable. Multiple configurations can be stored for access to different instances.
To use StackState CLI commands, you need to install the StackState CLI on the machine they will be run from.
Export / import configuration
Use the CLI to export all or specific data from StackState. Exported data can be imported from file.
sts graph list-types
StackState configuration is stored in the StackState graph database (StackGraph) in configuration nodes. Use the sts graph list-types
command to see the types of all configuration nodes.
sts graph export
Use the sts graph export
command to export different types of configuration nodes from and to StackState. Nodes are stored in StackState Templated JSON format.
Arguments
Examples
The example below will write all check functions to the file mycheckfunctions.stj
sts graph import
Use the sts graph import
command to import configuration previously exported configuration back into StackState.
Arguments
Examples
Send data to StackState
The CLI makes it easy to send test data to StackState.
sts anomaly send
The CLI provides an anomaly
command used to send anomaly data to StackState for a metric stream of a component.
sts event send
Use sts event send
to send a single event with a given name.
sts health send
Please refer to usage.md
in the CLI zip archive for detailed instructions.
sts metric send
You can use the CLI to send one data point of a given value or to generate a set of values within a defined bandwidth. This is useful if you want to check a new configuration with predictable data.
By default, generated metrics patterns are random between the specified bandwidth values. If a single bandwidth value is provided, the generated pattern will be a flat line. To generate a different type of pattern, use the arguments --baseline
and --linear
.
sts topology send
Please refer to usage.md
in the CLI zip archive for detailed instructions.
Inspect topic data
All data flowing through StackState flows through topics, for example topology, telemetry and traces. For debugging purposes, these topics can be inspected using the CLI. This can come in handy, for example, to make sure that StackState is receiving data correctly when you write your own integrations.
sts topic list
Get a list of all Kafka topics.
sts topic show
Use the topic show
command to display data for a specific topic.
Arguments
Manage StackPacks
The StackState CLI can be used to manage the StackPacks in your StackState instance.
Details of installed StackPacks
The command below returns an overview of all StackPacks currently installed on a StackState instance.
Install a StackPack
To install a StackPack, you must first upload it to the StackState server.
For example, the open-source SAP StackPack requires the parameter sap_host during installation. This command kicks off that installation:
Upgrade a StackPack
If you want to upgrade a StackPack, first upload the new StackPack version to the StackState server, then trigger the upgrade with the following command:
Note that StackState will upgrade to the latest StackPack version available on the StackState server.
Uninstall a StackPack
Uninstall a StackPack as follows:
Scripting
Use sts script
to execute a script via standard input. For example:
Note that the script provided as input must use proper quoting.
License
The StackState CLI can be used to check your license validity and update a license key when needed, for example, in case of expiration.
Note that it is not necessary to do this via the CLI. StackState will also offer this option in the UI when a license is about to expire or has expired.
See also
Last updated