Creating a default topology synchronization

Overview

StackState must be configured to process incoming JSON data into topology. The easiest way to do this is to use the auto-sync functionality. Auto-sync uses the same templates for all components and relations coming in via the data source. This enables new topology to be imported into StackState quickly. If you want to fully control the conversion of JSON data into topology, you can add mappings for specific component types.

Creating a topology data source

Configure StackState infrastructure

The first step in creating a custom topology data source is to send StackState a sample of the topology data you want to use. This creates the required infrastructure in StackState that can then be configured to suit your needs.

StackState expects topology data at the following endpoint:

https://stackstate-server:7077/stsAgent/intake/?api_key=YOUR_API_KEY

Use the following curl command to send the data:

curl -v user:password -X POST -H "Content-Type: application/json" --data-ascii @topology.json "https://stackstate-server:7077/stsAgent/intake/?api_key=API_KEY"

This request results in HTTP status code 200 OK if the data has been successfully processed. Example: topology.json

Configure a data source

Now that the StackState infrastructure is created for our new data, you can create a new data source.

Navigate to the StackState Settings section. Under Topology Sources, select Sts Sources. Click the plus button to create a new data source.

The data source creation screen looks like this:

The screen contains the following fields:

  • Name: The name of the data source.
  • Description: A description of the data source.
  • Use StackState's default Kafka: Use the default Kafka bus on the StackState server or a separate Kafka instance.
  • Integration Type: Select the integration type from the dropdown. This list is populated with the type passed in the instance / type field in the source JSON data.
  • Kafka Topic: Select a Kafka topic to retrieve data from. This list is populated based on the type and URL passed in the instance field in the source JSON data.

The following advanced settings are also available:

  • Maximum batch size: Specifies the maximum number of components from a JSON file that are processed in a single batch. Used for rate limiting.
  • Maximum # of batches/second: Specifies the maximum number of batches processed per second. Used for rate limiting.
  • Expire elements: Set topology to elements to expired if they do not appear in this data source for a configured amount of time.
  • Cleanup expired elements: Remove expired topology elements from StackState if they have been expired for a configured amount of time.

NOTE: if the topology data is sent in snapshot mode (see the JSON format description), expiry and cleanup of elements is not necessary, since each snapshots represents a complete landscape instance and elements missing from the snapshot are automatically deleted.

The screen contains the following buttons:

  • Test Connection: Verify that the target Kafka server is reachable.
  • Refresh: Refresh the lists of integration types and topics.
  • Create: Create the data source.
  • Cancel: Cancel creation of the data source.

Setting up a default synchronization

Import the auto-sync templates

Before you can start creating a default synchronization, you will need to import the auto-sync templates.

To import these templates into StackState, navigate to the Settings section. Under Import/Export, select Import Settings and select the file to upload.

Configure the auto-sync synchronization

Navigate to the StackState Settings section. Under Topology Synchronization, select Synchronizations. Click the plus button to create a new synchronization.

This is the first step in the wizard:

This screen allows you to configure the name and plugin for the synchronization. The screen contains the following fields:

  • Synchronization Name: The name of the synchronization.
  • Description: A description of the synchronization.
  • Plugin: Select Sts as the source plugin.

Click the right arrow on the bottom of the screen.

This screen allows you to configure the data source and component- and relation id extractors. The screen contains the following fields:

  • Choose source: Select the data source created in the previous step from the list.
  • Component Id Extractor: Select the Generic auto sync component id extractor.
  • Relation Id Extractor: Select the Generic auto sync relation id extractor.

The following advanced setting is available: * Start from earliest available topology data: If turned on, the topology data is processed starting from the earliest available data.

Click the right arrow on the bottom of the screen.

This screen allows you to configure component mappings for the synchronization.

In the Other Sources line at the bottom of the screen, select the Create action, no mapping function and the Autosync component template.

Click the right arrow on the bottom of the screen.

This screen allows you to configure relation mappings for the synchronization.

In the Other Sources line at the bottom of the screen, select the Create action, no mapping function and the Autosync relation template.

Click the right arrow on the bottom of the screen.

This screen allows you to review the settings for the synchronization. Click Save to store the synchronization.