Docker
StackState Self-hosted v5.1.x
Last updated
StackState Self-hosted v5.1.x
Last updated
StackState Agent V3 can run in a Docker container. The Agent collects data from the host where it's running and can be configured to integrate with external systems. Retrieved data is pushed to StackState, to work with this data the must be installed in your StackState instance. For details of the data retrieved and available integrations, see the .
In Docker Swarm mode, the StackState Swarm Agent can be deployed on the manager node to retrieve topology data for the cluster.
StackState Agent V3 will retrieve topology and metrics data from the host that it's running on. In , StackState Cluster Agent running on the manager node will synchronize data for a Docker cluster. For details, see the .
To start a single Docker container with StackState Agent V3, run the command below.
<STACKSTATE_RECEIVER_API_KEY>
is set during StackState installation.
<STACKSTATE_RECEIVER_API_ADDRESS>
is specific to your installation of StackState.
For details see .
To run StackState Agent V3 with Docker compose:
Add the following configuration to the compose file on each node where the Agent will run.
<STACKSTATE_RECEIVER_API_KEY>
is set during StackState installation.
Run the command:
To run StackState Swarm Agent in Docker Swarm mode:
Create a file docker-compose.yml
with the following content. Update to include details of your StackState instance:
<STACKSTATE_RECEIVER_API_KEY>
is set during StackState installation.
<CLUSTER_NAME>
is the name you would like to give this cluster
Run the command:
To upgrade StackState Agent V3 running inside a Docker container.
Stop the running container and remove it.
The StackState Agent V3 configuration is located in the file /etc/stackstate-agent/stackstate.yaml
. The configuration file contains the STS_API_KEY
and STS_STS_URL
environment variables set when the Docker command is run. No further configuration should be required, however, a number of advanced configuration options are available.
StackState Agent V3 can be configured to run checks that integrate with external systems. Each integration has its own configuration file that's used by the associated Agent check. Configuration files for integrations that will run through StackState Agent V3 in Docker should be added as a volume to the directory /etc/stackstate-agent/conf.d/
when the container is started.
For example, the Agent Docker configuration below includes a volume with a check configuration file for the ServiceNow integration:
If StackState Agent V3 will run checks that are configured to use self-signed certificates for HTTPs requests, override the CURL_CA_BUNDLE
environment variable:
To start, stop or restart StackState Agent V3, start or stop the container it's running in:
For status information, refer to the Docker log files for the container.
To run the Agent status command inside a container:
Use the command below to manually run an Agent check.
Docker logs for the StackState Agent V3 container can be followed using the command:
Inside the running container, StackState Agent V3 logs are in the following files:
/var/log/stackstate-agent/agent.log
/var/log/stackstate-agent/process-agent.log
By default, the log level of the Agent container is set to INFO
. To assist in troubleshooting, the Agent log level can be set to DEBUG
. This will enable verbose logging and all errors encountered will be reported in the Agent log files.
To set the log level to DEBUG
for an Agent running on Docker, use the STS_LOG_LEVEL
environment variable. Other optional logging settings:
STS_LOG_PAYLOADS: "true"
- include the topology/telemetry payloads sent to StackState in the Agent log.
STS_LOG_TO_CONSOLE: "true"
- write log output to the container stdout.
For example:
To uninstall StackState Agent V3, stop the Docker container it's running in and remove it.
StackState Agent V3 will retrieve the following topology data from the host that it's running on:
Hosts, processes and containers
Network connections between processes/containers/services
Containers
Services
Relations between containers and services
StackState Agent V3 will retrieve the metrics listed below for containers. Telemetry for hosts and processes, as well as network traffic telemetry for network connections between processes/containers/services will also be retrieved.
Metrics for containers
The list below shows the container metrics that are provided by default. Additional metrics may be supplied by other sources based on your specific implementation.
Container Restart
Container State
CPU amount of seconds throttled
CPU number of times throttled
CPU threads count
CPU time - System (percentage / second)
CPU time - Total (percentage / second)
CPU time - User (percentage / second)
IO read (bytes / second)
IO written (bytes / second)
Memory - Cache (bytes)
Memory - Resident (bytes)
Network received (bytes / second)
Network received (packets / second)
Network sent (bytes / second)
Network sent (packets / second)
<STACKSTATE_RECEIVER_API_ADDRESS>
is specific to your installation of StackState. For details see .
In Docker Swarm mode, the StackState Cluster Agent can be deployed on the manager node to retrieve basic topology data (services, containers and the relations between them). To retrieve full data, StackState Agent V3 must also be deployed on each node as a .
<STACKSTATE_RECEIVER_API_ADDRESS>
is specific to your installation of StackState. For details see .
Running the StackState Swarm Agent in Docker Swarm mode will collect basic topology data from the cluster. To retrieve more data, including telemetry, StackState Agent V3 must also be installed on each node in the Swarm cluster as a .
Run the container using the instructions provided in .
StackState Agent V3 can be configured to reduce data production, tune the process blacklist, or turn off specific features when not needed. The required settings are described in detail on the page .
Documentation for the available StackState integrations, including how to configure the associated Agent checks, can be found on the .
The Agent can be configured to use a proxy for HTTP and HTTPS requests. For details, see .
StackState Agent V3 can be configured to collect traces via a . If the Agent will be used in conjunction with a language specific trace client, make sure to configure your app to use the hostβs PID namespace:
To troubleshoot the Agent, try to or .
Troubleshooting steps for any known issues can be found in the .
In , StackState Cluster Agent running on the manager node will synchronize the following topology data for a Docker cluster: