Full Stack Example with Docker Compose
This example demonstrates how to bring up a complete Butler SOS stack using Docker Compose. This includes Butler SOS, InfluxDB (v1), and Grafana with a pre-configured dashboard.
InfluxDB Versions
While this example uses InfluxDB v1, there are also Docker Compose files available for InfluxDB v2 and v3 in the same directory:
docker-compose_fullstack_influxdb_v2.ymldocker-compose_fullstack_influxdb_v3.yml
Overview
The provided Docker Compose file sets up the following services:
- Butler SOS: The main application collecting metrics.
- InfluxDB: A time-series database to store the metrics.
- Grafana: A visualization tool to view the metrics.
Note
The data shown in this example is Butler SOS's own memory consumption. The configuration does not query any Qlik Sense servers.
Prerequisites
- Docker and Docker Compose installed on your machine.
Steps
Navigate to the
docs/docker-composedirectory in the Butler SOS repository.Run the following command to start the stack:
bashdocker-compose -f docker-compose_fullstack_influxdb_v1.yml up -dWait for the containers to start.
Each Docker Compose file comes with a config file for Butler SOS, one for each of InfluxDB v1, v2 and v3, in docs/docker-compose/config. See The example config files.
InfluxDB v3 Note
If you are using the InfluxDB v3 compose file (docker-compose_fullstack_influxdb_v3.yml), you will notice an additional service called setup-influxdb starting up.
This is a temporary helper container that automatically creates the database and configures the instance using a pre-defined token (mounted from config/admin_token.txt). This architecture ensures a fully automated startup experience without requiring manual token generation or CLI commands.
Security Note
Using a pre-defined token in a text file on disk is not recommended for production use. This approach is implemented here solely to provide an easy-to-use, automated example stack. In a production environment, you should use proper secret management and avoid storing sensitive tokens in plain text files.
Accessing Grafana
Once the stack is up and running, you can access Grafana in your web browser:
No login is required as anonymous access is enabled for this example.
Viewing the Dashboard
Grafana is pre-provisioned with a dashboard showing Butler SOS metrics.
- Open Grafana at http://localhost:3000.
- Navigate to Dashboards.
- Select the Butler SOS dashboard.
You should see a dashboard similar to the one below, displaying internal metrics from Butler SOS.

The example config files
Changed in 15.4.0
Before Butler SOS 15.4.0, the example config files had fallen behind the settings Butler SOS requires, and Butler SOS refused to start with any of them.
The Docker Compose examples in the Butler SOS repository each come with a config file, one for each of InfluxDB v1, v2 and v3, in docs/docker-compose/config. Before 15.4.0, starting one of the examples stopped Butler SOS at once, with a report like this in the container log:
Config file /nodeapp/config/production_influxdb_v1.yaml has 4 problems:
line 2, col 1 Butler-SOS.crashFile
is missing. Add it under Butler-SOS.
line 2, col 1 Butler-SOS.errorTracking
is missing. Add it under Butler-SOS.
line 142, col 9 Butler-SOS.logEvents.udpServerConfig.allowedSources
is missing. Add it under Butler-SOS.logEvents.udpServerConfig.
line 142, col 9 Butler-SOS.logEvents.udpServerConfig.enableSourceValidation
is missing. Add it under Butler-SOS.logEvents.udpServerConfig.With the compose file's restart: unless-stopped, the container restarted every few seconds and printed the same report each time.
The three example config files now include the missing settings, so they start as shipped:
Butler-SOS:
crashFile:
enable: true
crashFileDirectory: log/crash_dumps
crashFileCreateJson: true
crashFileCreateText: true
errorTracking:
enable: true
logSummary:
enable: true
influxdb:
enable: true
measurementName: butler_sos_errors
logEvents:
udpServerConfig:
enableSourceValidation: false
allowedSources: []Crash dump files go to log/crash_dumps, inside the log folder the examples mount from the host. That puts them outside the container, where they survive a restart, and where Butler SOS can write them.
The shipped config template and these example files are checked against the settings Butler SOS requires every time a change to Butler SOS is tested. That way they can't fall behind again unnoticed.
What to do:
- You copied an example config before this change: add the settings above to your copy, or run Butler SOS with
--check-configto see exactly what your copy lacks. See Checking a config file without starting Butler SOS. - You start from the examples now: nothing. They work as shipped.