Clear stored data

StackState Self-hosted v5.0.x

This page describes StackState version 5.0.

Go to the documentation for the latest StackState release.

The data in StackState is divided into three different sets:

  • Elasticsearch data

  • Kafka Topic data

  • StackGraph data

With this much data to store, it is important to have the means to manage it. There is a standard 8 days data retention period set in StackState. This can be configured according to your needs using the StackState CLI or manually on each machine. Find out more about StackState data retention.

Clear data using the stac CLI

Clearing the data in StackState will remove any configured permissions from the system.

The stac CLI needs access to the Admin API (default port 7071) to issue the command used below.

Running the stac CLI delete command will:

  • Stop all necessary services.

  • Delete all topology and telemetry data. Note that, the Kafka topics folder needs to be deleted manually from the StackState server. The Kafka topics folder is located in /opt/stackstate/var/lib/ and is named kafka.

  • Start StackState.

# Delete all topology and telemetry data
stac graph delete --all

# The Kafka topics folder needs to be deleted manually from the StackState server:
# /opt/stackstate/var/lib/kafka

⚠️ PLEASE NOTE - from StackState v5.0, the old sts CLI is called stac.

In a future release of StackState, the new sts CLI will fully replace the stac CLI. It is advised to install the new sts CLI and upgrade any installed instance of the old sts CLI to stac. For details see:

Clear data manually

Clearing the data in StackState will remove any configured permissions from the system.

To clear stored data in StackState running on Kubernetes, it is recommended to run a clean install.

Last updated