> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collector configuration options

The collector can be [configured](/collector/configuration) at start-up using environment variables or a configuration file.

The following list includes all configuration options with the name of the environment variable and the name of the key in the configuration file.

For more information on how to configure the AppSignal Collector with a configuration file or using environment variables, see our [configuration section](/collector/configuration).

## Available options

* Required options
  * [`push_api_key`](#option-push_api_key)
* Options
  * [`cpu_count`](#option-cpu_count)
  * [`enable_host_metrics`](#option-enable_host_metrics)
  * [`files_world_accessible`](#option-files_world_accessible)
  * [`hostname`](#option-hostname)
  * [`http_port`](#option-http_port)
  * [`log_level`](#option-log_level)
  * [`push_api_endpoint`](#option-push_api_endpoint)
  * [`running_in_container`](#option-running_in_container)
  * [`working_directory_path`](#option-working_directory_path)

## push\_api\_key

<a id="option-push_api_key" />

| Field                   | Value                          |
| ----------------------- | ------------------------------ |
| Config file key         | `push_api_key`                 |
| System environment key  | `APPSIGNAL_PUSH_API_KEY`       |
| Required                | yes                            |
| Type                    | `String`                       |
| Default value           | nil (This is unset by default) |
| Available since version | `0.1.0`                        |

### Description

The organization-level authentication key to authenticate with our Push API.

Read more about the [AppSignal Push API key](/appsignal/terminology#push-api-key).

## cpu\_count

<a id="option-cpu_count" />

| Field                   | Value                 |
| ----------------------- | --------------------- |
| Config file key         | `cpu_count`           |
| System environment key  | `APPSIGNAL_CPU_COUNT` |
| Required                | no                    |
| Type                    | `Float`               |
| Default value           | `undefined`           |
| Available since version | `0.3.0`               |

### Description

The available CPU capacity of the host, in number of CPUs. This is used to calculate the CPU usage percentage in the host metrics. If not set, the agent will attempt to automatically detect this from cgroups.

The number of CPUs can be a fraction, e.g. `0.5`.

## enable\_host\_metrics

<a id="option-enable_host_metrics" />

| Field                   | Value                                                                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Config file key         | `enable_host_metrics`                                                                                                         |
| System environment key  | `APPSIGNAL_ENABLE_HOST_METRICS`                                                                                               |
| Required                | no                                                                                                                            |
| Type                    | Boolean (`true` / `false`)                                                                                                    |
| Default value           | `false`                                                                                                                       |
| Available since version | `0.3.0`                                                                                                                       |
|                         | <ul><li>`0.8.0`: Disabled by default.</li><li>`0.3.0`: Disabled by default in the appsignal/collector Docker image.</li></ul> |

### Description

Set this option to `false` to disable [host metrics](/metrics/host-metrics) collection.

On Heroku and Dokku host metrics are disabled by default. This is done because these systems will report inaccurate metrics from within the containers. Host metrics collection on these systems cannot be enabled. For Heroku, use the [Heroku log drain](/heroku/host-metrics) instead.

## files\_world\_accessible

<a id="option-files_world_accessible" />

| Field                   | Value                              |
| ----------------------- | ---------------------------------- |
| Config file key         | `files_world_accessible`           |
| System environment key  | `APPSIGNAL_FILES_WORLD_ACCESSIBLE` |
| Required                | no                                 |
| Type                    | Boolean (`true` / `false`)         |
| Default value           | `true`                             |
| Available since version | `0.1.0`                            |

### Description

If this is set to `true` the [AppSignal working directory](/appsignal/how-appsignal-operates#working-directory) that is created is accessible for all users (Unix permissions `0666`). This is often necessary because processes for the same app run under a different user. Set to `false` to disable this behaviour (Unix permissions `0644`).

## hostname

<a id="option-hostname" />

| Field                   | Value                |
| ----------------------- | -------------------- |
| Config file key         | `hostname`           |
| System environment key  | `APPSIGNAL_HOSTNAME` |
| Required                | no                   |
| Type                    | `String`             |
| Default value           | detected from system |
| Available since version | `0.3.0`              |

### Description

This overrides the server's hostname. Useful for when you're unable to set a custom hostname or when a nondescript id is generated for you on hosting services.

## http\_port

<a id="option-http_port" />

| Field                   | Value                 |
| ----------------------- | --------------------- |
| Config file key         | `http_port`           |
| System environment key  | `APPSIGNAL_HTTP_PORT` |
| Required                | no                    |
| Type                    | `Integer`             |
| Default value           | `8099`                |
| Available since version | `0.3.0`               |

### Description

The port used by the collector's HTTP server to receive OpenTelemetry export requests on.

## log\_level

<a id="option-log_level" />

| Field                   | Value                 |
| ----------------------- | --------------------- |
| Config file key         | `log_level`           |
| System environment key  | `APPSIGNAL_LOG_LEVEL` |
| Required                | no                    |
| Type                    | `String`              |
| Default value           | `info`                |
| Available since version | `0.1.0`               |

### Description

<Note>
  This option sets the severity level of AppSignal's internal logger and does
  not affect the [logging feature](/logging).
</Note>

Set the severity level of AppSignal's internal logger. If it is configured to "info" it will log all error, warning and info messages, but not log the debug messages.

Setting it to the levels "debug" or "trace" is usually only needed on request from support. Setting the level to "debug"/"trace" could have a slight impact on the disk usage and IO, especially on high-traffic sites. CPU overhead is minimal with the debug option enabled.

Accepted values:

* error
* warning
* info
* debug
* trace

## push\_api\_endpoint

<a id="option-push_api_endpoint" />

| Field                   | Value                         |
| ----------------------- | ----------------------------- |
| Config file key         | `push_api_endpoint`           |
| System environment key  | `APPSIGNAL_PUSH_API_ENDPOINT` |
| Required                | no                            |
| Type                    | `String`                      |
| Default value           | `https://push.appsignal.com`  |
| Available since version | `0.1.0`                       |

### Description

Configure the endpoint to send data to AppSignal. This setting will not have to be changed.

## running\_in\_container

<a id="option-running_in_container" />

| Field                   | Value                            |
| ----------------------- | -------------------------------- |
| Config file key         | `running_in_container`           |
| System environment key  | `APPSIGNAL_RUNNING_IN_CONTAINER` |
| Required                | no                               |
| Type                    | Boolean (`true` / `false`)       |
| Default value           | detected by collector            |
| Available since version | `0.3.0`                          |

### Description

AppSignal expects to be running on the same machine between different deploys. Set this key to `true` if the application is running in a container, such as with Docker.

Newer versions of the AppSignal integration automatically detect its container environment, so no manual configuration is necessary. If you're having trouble with the automatic detection, please [contact support](mailto:support@appsignal.com).

This option is set to `true` automatically on [Heroku](http://heroku.com/).

## working\_directory\_path

<a id="option-working_directory_path" />

| Field                   | Value                                                                                               |
| ----------------------- | --------------------------------------------------------------------------------------------------- |
| Config file key         | `working_directory_path`                                                                            |
| System environment key  | `APPSIGNAL_WORKING_DIRECTORY_PATH`                                                                  |
| Required                | no                                                                                                  |
| Type                    | `String`                                                                                            |
| Default value           | detected by collector                                                                               |
| Available since version | `0.1.0`                                                                                             |
|                         | <ul><li>This config option was called `working_dir_path` in versions 0.1.0 through 0.3.x.</li></ul> |

### Description

Override the location where the AppSignal Collector can store temporary files. Use this option if the default location is not suitable. See our [how AppSignal operates](/appsignal/how-appsignal-operates) page for more information about the purpose of this working directory.

If you are running multiple applications using AppSignal on the same server, use this configuration option to select different working directories for every AppSignal instance, otherwise the two instances could conflict with one another. For more information on this scenario see our [running multiple applications on one host](/guides/application/multiple-applications-on-one-host) documentation.

<Note>
  **Note**: The specified path cannot contain Operating Specific file system
  abstractions, such as the homedir symbol `~` for \*NIX systems. This will be
  seen as a malformed path.
</Note>
