Static Topology

StackState Self-hosted v4.5.x

This page describes StackState v4.5.x. The StackState 4.5 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.5 version range to upgrade to a more recent release.

Go to the documentation for the latest StackState release.

Overview

The Static Topology StackPack reads topology information from an external CSV file and synchronizes the data with StackState.

Static Topology is a StackState curated integration.

Setup

Prerequisites

To set up the StackState Static Topology integration, you need to have:

Install

Install the Static Topology StackPack from the StackState UI StackPacks > Integrations screen. You will need to provide the following parameters:

  • Path to component CSV file - the CSV file to read component data from.

  • Path to relation CSV file - the CSV file to read relation data from.

The CSV files should follow the Static Topology CSV file specification and be available in a location where StackState Agent is able to read them, for example /etc/stackstate-agent/conf.d/. StackState Agent V2 runs as system user/group stackstate-agent.

Configure

To enable the Static Topology check and begin collecting topology data from the configured CSV files, add the following configuration to StackState Agent V2:

Example Agent configuration file for Static Topology: conf.yaml.example (github.com)

  1. Copy the example Agent configuration file mv /etc/stackstate-agent/conf.d/static_topology.d/conf.yaml.example /etc/stackstate-agent/conf.d/static_topology.d/conf.yaml.

  2. Edit the copied Agent configuration file /etc/stackstate-agent/conf.d/static_topology.d/conf.yaml to add details of the CSV files:

    • components_file - Path to the component CSV file to read component data from. The same as entered when the StackPack was installed.

    • relations_file - Path to the relation CSV file to read relation data from. The same as entered when the StackPack was installed.

    • delimiter - The delimiter used in the CSV files.

init_config:

instances:
  - type: csv
    components_file: /path/to/components.csv
    relations_file: /path/to/relations.csv
    delimiter: ','
 
    #tags:
    #  - optional_tag1
    #  - optional_tag2
  1. You can also add optional configuration:

    • tags - Tags to add to the imported topology elements.

  2. Verify that the files could be read successfully using the command:

agent check static_topology

5.Restart the StackState Agent(s) to apply the configuration changes. 6.Once the Agent has restarted, wait for the Agent to collect data from the CSV files and send it to StackState.

Status

Execute the info command and verify that the integration check has passed. The output of the command should contain a section similar to the following:

Checks
[...]

static_topology
* instance #0 [OK]

CSV file specification

Static topology is read from two CSV files:

  1. A CSV file containing components

  2. A CSV file containing relations

Both CSV files are read to form a topology. The CSV file for components and relations have different requirements, these are described on this page. Both files require a CSV header.

Component CSV file

The component CSV file contains details of components. The file should contain a header with the following fields:

  • id - The component's unique identifier.

  • name - The component's name.

  • type - The component type. For example, VM, datastore or rack.

  • domain (Optional) - The StackState domain where the component should be visualized.

  • layer (Optional) - The StackState layer in where the component should be visualized.

  • environment (Optional) - The StackState environment in where the component should be visualized.

  • All other fields will be added as metadata on the component

Headers are case-sensitive.

id,name,type,layer,domain,environment
1,component1,vm,machines,mydomain,myenvironment
2,component2,vm,machines,mydomain,myenvironment

Relation CSV file

The relation CSV file contains details of relations between components. The file should contain a header with the following fields:

  • sourceid - The identifier of the component to create a relation from. This must match the component id in the component CSV file.

  • targetid - The identifier of the component to create a relation to. This must identifier has to match the component id in the component CSV file.

  • type - The type of a relation. For example, 'uses' or 'depends on'.

Headers are case-sensitive.

sourceid,targetid,type
1,2,uses

Setup

Configuration

  1. Configure the Agent to read CSV topology files. Edit conf.d/static_topology.d/conf.yaml:

    Static topology from file

    init_config:

instances:

  • type: csv components_file: /path/to/components.csv relations_file: /path/to/relations.csv delimiter: ';'

    tags:

    - optional_tag1

    - optional_tag2

  • Restart the Agent

Configuration Options

  • type - Set to csv for parsing CSV typed files

  • components_file - Absolute path to CSV file containing topology components

  • relations_file - Absolute path to CSV file containing topology relations

  • delimiter - CSV field delimiter

  • tags (Optional) - StackState labels to add to each component and relation read from the CSV files.

Validation

Execute the info command and verify that the integration check has passed. The output of the command should contain a section similar to the following:

Checks

[...]

static_topology

  • instance #0 [OK]

Release notes

StaticTopology StackPack v2.3.2 (2021-05-12)

  • Bugfix: Use the domain, layer, environment and type coming from data in component template

StaticTopology StackPack v2.3.1 (2021-04-12)

  • Improvement: Common bumped from 2.5.0 to 2.5.1

StaticTopology StackPack v2.3.0 (2021-04-02)

  • Improvement: Enable auto grouping on generated views.

  • Improvement: Common bumped from 2.2.3 to 2.5.0

  • Improvement: StackState min version bumped to 4.3.0

StaticTopology StackPack v2.2.1 (2020-08-18)

  • Feature: Introduced the Release notes pop up for customer

StaticTopology StackPack v2.2.0 (2020-08-04)

  • Improvement: Deprecated StackPack specific layers and introduced a new common layer structure.

  • Improvement: Replace resolveOrCreate with getOrCreate.

StaticTopology StackPack v2.1.0 (2020-04-23)

  • Improvement: Upgrade the requirement and documentation of Static Topology to use AgentV2.

Last updated