CLI

The StackState CLI can be used to configure StackState and work with data in StackState. The CLI does all its work via the StackState REST endpoints.

Installation

The CLI can be downloaded from https://download.stackstate.com using your license key.

Prerequisites

  • Bash
  • Docker

Configuration and detailed help

Please refer to usage.md in the CLI zip file for further instructions on how to configure the CLI.

To get help on the CLI commands call sts -h. Detailed help on each command is availble via sts <command> -h.

Configuring StackState through the CLI

You can use the sts graph export and sts graph import commands to export and import different types of configuration nodes from and to StackState. To list all configuration nodes of a type call sts graph list <type>.

Some well known configuration nodes are:

  • Sync
  • TemplateFunction
  • ComponentType
  • RelationType
  • Domain
  • Layer
  • Environment
  • DataSource
  • View
  • EventHandler
  • CheckFunction
  • BaselineFunction
  • PropagationFunction
  • EventHandlerFunction
  • MappingFunction
  • IdExtractorFunction
  • ViewHealthStateConfigurationFunction

It may be handy to write configurations to disk. For example, to write all check function to disk call:

sts graph list --ids CheckFunction | xargs sts graph export --ids > mycheckfunctions.stj

To import these check functions call:

sts graph import < mycheckfunctions.stj

Inspecting data with the CLI

Data flowing through Kafka topics

Use sts topic list to list all Kafka topics active for a StackState instance. Then use sts topic show <topic> to inspect a topic.

Topology and Telemetry

To inspect both topology and telemetry a script can be executed with the sts script command.

Sending data with the CLI

Using the CLI you can easily send some test topology or telemetry to StackState.

  • For help on sending metrics: sts metrics send -h
  • For help on sending events: sts events send -h
  • For help on sending topology: sts topology send -h (please refer to usage.md for detailed instructions).