StackState runs on the Java virtual machines and comes packaged with its own graph database called StackGraph. To run StackState you must first run StackGraph, a time traveling graph database we’ve built on top of HBase. StackState is built on a highly distributed architecture, therefore it runs as a number of Java processes that communicate with each other via TCP/IP.


To install StackState on Fedora, Red Hat or CentOS there is an RPM package available to easily install and upgrade StackState. For Debian and Ubuntu there is a DEB package available. Packages can be obtained from the distribution website.

Installing StackState

Below are installation instructions for StackState on different platforms.

Installing StackState on Fedora, Red Hat, CentOS, Debian or Ubuntu

Installation instructions

To let yum automatically install the right java version for the RPM package use: - yum localinstall <stackstate>.rpm

Or you can use rpm, which assumes the correct java version is already installed: - rpm -i <stackstate>.rpm

To install using the DEB package, assuming the correct java version is already installed: - dpkg -i <stackstate>.deb

Alternatively use apt-get which will also install the proper Java version: - apt-get install <stackstate>.deb

The package creates a stackstate user and group as which StackState will be running.

By default, the data directory is set to /opt/stackstate/var/lib and the log directory is set to /opt/stackstate/var/log. It is possible to change the data and log directories by setting the appropriate environment variables prior to installing StackState. Set environment variable STACKSTATE_DATA_DIR to set the data directory and set the environment variable STACKSTATE_LOG_DIR to set the log directory.

Proceed with the instructions described in Configuring StackState.

Installing StackState on MacOs and other Linux flavors

StackState has been tested on recent versions of MacOs and Ubuntu.

Installation instructions

  1. Unzip the <stackstate>.zip into the directory where you want to install StackState.
  2. Create a user and group used called stackstate.
  3. Before starting StackState, it has to configure its directory structure. This is done by running a config script, which uses a directory structure configured inside the script. If you want to change the default structure, you can edit this file, before starting the config script. Execute the line below to run the config script, passing the user and group created in the previous step.
    • bin/ stackstate stackstate

Proceed with the instructions described in Configuring StackState.

Installing StackState in a two-node distributed configuration

To improve the performance of the StackState installation, it can be split over two nodes with each node performing a different function. The first node will run StackState itself, including Kafka and ElasticSearch. The second node will run the StackGraph data store.

Configure StackState to run in the two-node setup as follows:

  1. Prepare the first (StackGraph) node as described below.
  2. Prepare the second (StackState) node as described below.
  3. Proceed with the instructions described in Configuring StackState.
  4. Start the StackState process as described in Starting / Stopping.

Preparing the StackGraph node

  1. Extract the StackState RPM or Debian package the first node. This will be the StackGraph node.
  2. Run systemctl disable stackstate
  3. Add Environment=STACKGRAPH_NODE_NAME=<stackgraph-host-name> to /lib/systemd/system/stackgraph.service
  4. Start the StackGraph process as described in Starting / Stopping.
  5. Reload systemd daemon: systemctl daemon-reload

Preparing the StackState node

To prepare an additional node for running a StackState component, follow these steps:

  1. Extract the StackState RPM or Debian package.
  2. Run systemctl disable stackgraph
  3. Modify the provided SystemD configuration files as follows:

    • Edit the file /lib/systemd/system/stackstate.service:
    • Remove the stackgraph.service from the Requires and After sections
    • Define the environment variable ZOOKEEPER_QUORUM by adding the line Environment=ZOOKEEPER_QUORUM=<your-stackgraph-server> under the [Service] section, with the hostname of your StackGraph server as the value.
    • Reload systemd daemon: systemctl daemon-reload

After these changes the stackstate.service file should look approximately like this:

Description=StackState System monitor Service

ExecStart=/opt/stackstate/bin/ start
ExecReload=/opt/stackstate/bin/ reload
ExecStop=/opt/stackstate/bin/ stop