AppSignal Standalone agent config load order

The AppSignal standalone agent can be configured using environment variables or a configuration file.

The configuration is loaded in a four step process, loading the configuration from different sources.

Load orders

1. Agent defaults

The agent starts with loading its default configuration, setting default paths and enabling certain features. The agent defaults can be found on the options page.

2. System detected settings

The agent detects what kind of system it's running on and configures itself accordingly. If a configuration option looks at the system to set its default, this will be listed on the options page.

For example, when it's running inside a container based system (such as Docker and Heroku) it sets the configuration option running_in_container to true and enables or disables host metrics automatically.

3. Environment variables

The agent will look for its configuration in environment variables. See the options page for available configuration options.

Environment variables can be in global environment configurations that are loaded on boot for installed Linux packages and set in scripts before calling the appsignal-agent process.

bash
export APPSIGNAL_APP_NAME="my custom app name" # start the agent here

When AppSignal environment variables are found for configuration options, these will override all given configuration options from previous steps.

4. Config file

This configuration source is used by the Linux package installation. It is also loaded using the --config CLI option when calling the appsignal-agent process manually.

The path of this configuration file is /etc/appsignal-agent.conf for the Linux package installation. If the standalone agent is called manually with the --config option, the file must be at the place specified with the --config option. For example, appsignal-agent --config /path/to/config/appsignal.conf will look for the file at /path/to/config/appsignal.conf.

When AppSignal environment variables are found for configuration options, these will override all given configuration options from previous steps.