IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

General configuration options

edit

This documentation refers to configuring the standalone (legacy) APM Server. This method of running APM Server will be deprecated and removed in a future release. Please consider upgrading to Fleet and the APM integration. If you’ve already upgraded, please see Input settings instead.

Example config file:

apm-server:
  host: "localhost:8200"
  rum:
    enabled: true

output:
  elasticsearch:
    hosts: ElasticsearchAddress:9200

max_procs: 4

If you are using an X-Pack secured version of Elastic Stack, you need to specify credentials in the config file before you run the commands that set up and start APM Server. For example:

output.elasticsearch:
  hosts: ["ElasticsearchAddress:9200"]
  username: "elastic"
  password: "elastic"

Configuration options: apm-server.*

edit
host
edit

Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a Unix domain socket. Defaults to localhost:8200.

max_header_size
edit

Maximum permitted size of a request’s header accepted by the server to be processed (in Bytes). Defaults to 1048576 Bytes (1 MB).

idle_timeout
edit

Maximum amount of time to wait for the next incoming request before underlying connection is closed. Defaults to 45 seconds.

read_timeout
edit

Maximum permitted duration for reading an entire request. Defaults to 30 seconds.

write_timeout
edit

Maximum permitted duration for writing a response. Defaults to 30 seconds.

shutdown_timeout
edit

Maximum duration in seconds before releasing resources when shutting down the server. Defaults to 5 seconds.

max_event_size
edit

Maximum permitted size of an event accepted by the server to be processed (in Bytes). Defaults to 307200 Bytes.

Configuration options: general

edit
max_connections
edit

Maximum number of TCP connections to accept simultaneously. Default value is 0, which means unlimited.

auth.secret_token
edit

Authorization token for sending data to the APM server. If a token is set, the agents must send it in the following format: Authorization: Bearer <secret-token>. The token is not used for RUM endpoints. By default, no authorization token is set.

It is recommended to use an authorization token in combination with SSL enabled. Read more about Securing APM Server and the secret token.

secret_token
edit

Deprecated in 7.14.0.

Replaced by auth.secret_token. See auth.secret_token

In versions prior to 7.14.0, secret token authorization was known as apm-server.secret_token. In 7.14.0 this was renamed apm-server.auth.secret_token. The old configuration will continue to work until 8.0.0, and the new configuration will take precedence.

capture_personal_data
edit

If true, APM Server captures the IP of the instrumented service and its User Agent if any. Enabled by default.

default_service_environment
edit

Sets the default service environment to associate with data and requests received from agents which have no service environment defined.

expvar.enabled
edit

When set to true APM Server exposes golang expvar. Disabled by default.

expvar.url
edit

Configure the URL to expose expvar. Defaults to debug/vars.

instrumentation.enabled
edit

Enables self instrumentation of the APM Server itself. Disabled by default.

Configuration options: max_procs

edit
max_procs
edit

Sets the maximum number of CPUs that can be executing simultaneously. The default is the number of logical CPUs available in the system.

Configuration options: data_streams

edit
wait_for_integration
edit

Wait for the apm Fleet integration to be installed by Kibana. Requires either apm-server.kibana.enabled or for the Elasticsearch output to be configured. Defaults to true.