The topology in StackState is likely much bigger than what you care about at any given time. StackState allows you to filter the topology to locate the part of the topology you are interested in.
The main way of filtering the topology is by using the basic filter panel, accessed using the filter icon.
When you open StackState’s topology view initially, it will show you all of the topology it can, provided it doesn’t go over the configured topology limit. If there is more topology than can be shown while still keeping the system usable, StackState shows you a warning message and suggest you apply more filters to your topology selection.
From here, you can use the basic filter panel to filter the topology on certain properties. If you select a particular property, the topology view will be updated to show only the topology that matches the selected value. Selecting multiple properties narrows down your search (ie it combines them using an
AND operator). Selecting multiple values for a single property expands your search (ie it combines them using an
Using the basic filter panel you can select a subset of your topology based on the following properties:
In addition to specifying which components to show, the basic filter panel also allows you to specify two settings.
Root Cause Analysis automatically expands the topology selection to display the root cause of an issue. There are three settings:
Show Components adds one or more specific components to the topology selection. You can search for the component by name.
Here is an example of using the basic filtering capabilities. This example shows how to filter for a particular layer (
Applications) and a tag (
The same topology selection can also be shown in list format:
It is also possible to interactively navigate the topology. Right-click on a component to bring up the component navigation menu:
Selecting an action from the menu allows you to change your view, respective to the selected component.
Show expands the topology selection in one of the following ways:
Show only with … isolates the selected component (shows only that component) and expands the topology selection in one of the following ways:
If you want full control over your topology selection, you can use advanced topology selection. Advanced topology selection is used via the advanced filter bar, accessed by selecting Advanced on the basic filter panel. The advanced filter bar allows you to select topology using StackState’s built-in query language.
StackState Query Language (STQL) has the following core concepts:
Function always have an output type and can have have one or more arguments.
withNeighborsOf(components = (name = "myApp")).
List of functions:
|components||Set<Component>||Selection of components|
|withNeighborsOf||Set<Component>||select the neighbors of (specific) components|
|withCauseOf||Set<Component>||select the (root) cause and (optional) the path to this for (specific) components.|
STQL is a language which will defer execution till the moment the data is needed.
STQL is a Typed language, this means that all functions have typed input parameters and output. Not all functions work with all types. Types in STQL are inferred where possible. The following types are available:
The boolean operators are by default executed in the following order: First
OR and as of last rule
AND if you want to change the order you can use query blocks
AND If you want to have a rule that combines two basic filters in one rule you can use AND.
AND will combine the LEFT and RIGHT basic filters as one result. Example:
layer = "application" AND healthstate = "CRITICAL"
OR If you want to have a rule that combines the output of two basic filters in a query you can use OR.
OR will combine the LEFT and RIGHT basic filters as one result. Example:
layer = "application" AND healthstate = "CRITICAL"
NOT This rule subtracts all the results matching the right-hand side from the left-hand side. Example:
NOT (name = "AppA" OR name = "AppB"). This example will select all components except the ones with the name “AppA” or “AppB”.
If you want to combine multiple boolean operators
AND combinations and control the order, you can use
( ... ) to do this. Example:
(name = "AppA" OR name = "AppB") AND layer = "Application". Now the
name = "AppA" OR name = "AppB" is executed first, and both will be checked for the layer = “Application”. Without the code block only “AppB” will be checked for the layer = “Application” because the default order is
AND and as of last rule
A functions can have one ore more parameters. Parameters can be named and are typed. For example
withNeighborsOf(components = (name = "DLL_DB"), levels = "10", direction = "both")
components function is the implicit function used to select components based on a filter with support for key/value pair selection. All key-value pair filters added are implicitly filtering properties of components in your topology.
The key can be any key from the key/value pairs which you can put on a component. Or the following special keys:
name, The name of the component
healthstate, The own healthstate of the component
label, Matching label(s) of the component
layer, Matching layers of the component
domain, Matching layers of the component
environment, Matching layers of the component
The basic filter operators are:
The default behavior of a key-value filter is that it filters on properties of components:
name = "AppA"
name = "AppA" OR healthstate = "CRITICAL"
In other words: * basic
layer = "application" * name based selection
name in ("ApplicationA", "ApplicationB")
The withNeighborsOf function is used to append the ouput of the stream with neighbouring components.
direction=(optional, default=both) <direction> The direction can be
up for components which depend on this component and
down for dependencies.
both can be used for the combination of
levels is the number of levels you want to repeat this function. Use
all to continue till there are no more levels. This is limited to 15.
components=(optional, default=all components in input)<set-of-components> The component for which the neighbours should be returned
The withCauseOf function is used to append the output with the cause of a healthstate.
causeOnly=(optional, default=false)<boolean> to select only the cause itself select
true otherwise select
false to also select all components on the path to the cause.
components=<set-of-components> The component(s) for which the cause should be returned
name = "serviceB"
layer = "application"
layer = "application" AND (healthstate = "CRITICAL" OR healthstate = "DEVIATING") OR withNeighborsOf(components = (name IN ("appA","appB")))
layer = "application" AND healthstate != "CRITICAL" OR (name in ("serviceA", "serviceB")) OR withNeighborsOf(components = (name = "AppA"), levels = "2")
layer = "application" AND (healthstate = "CRITICAL'" OR healthstate = "DEVIATING") OR withCauseOf(components = (id = "1"))
If you (start to)type a word at the beginning of a new code block (after the beginning of the line or after an
If you are at the end of a key
If you (start to)type a word after a basic filter operator