StackState Static Topology DSL allows you to easily define components, relations, events and health
in .topo files using a Topology Language.
The topology can be sent to the StackState server via a CLI or configured as an Agent Check.
See documentation for more information.
The Topology language is defined in topology.tx using Textx meta-language
Visualization of the model topoloy.topo
For VSCode, copy ./grammar/topo-vscode to ~/.vscode/extensions
For Intellij import the ./grammar/topo-tmbundle. See Textmate Bundles
stsdev is a tool to aid with the development StackState Agent integrations.
Poetry is used as the packaging and dependency management system.
Dependencies for your project can be managed through poetry add or poetry add -D for development dependency.
$ poetry add PyYAML###Build the project To build the project,
$ stsdev build --no-run-testsThis will automatically run code formatting, linting, tests and finally the build.
###Unit Testing To run tests in the project,
$ stsdev testThis will automatically run code formatting, linting, and tests.
###Dry-run a check
A check can be dry-run inside the StackState Agent by running
$ sudo -u stackstate-agent check xxxstsdev makes this take simple by packaging your checks and running the agent check using docker.
$ stsdev agent check static_topology_dslBefore running the command, remember to copy the example conf tests/resources/conf.d/static_topology_dsl.d/conf.yaml.example to
tests/resources/conf.d/static_topology_dsl.d/conf.yaml.
###Running checks in the Agent
Starts the StackState Agent in the foreground using the test configuration tests/resources/conf.d
$ stsdev agent run$ stsdev package --no-run-testsThis will automatically run code formatting, linting, tests and finally the packaging.
A zip file is created in the dist directory. Copy this to the host running the agent and unzip it.
Run the install.sh.

