Configure the File outputedit

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.

The File output dumps the transactions into a file where each transaction is in a JSON format. Currently, this output is used for testing, but it can be used as input for Logstash.

To use this output, edit the APM Server configuration file to disable the Elasticsearch output by commenting it out, and enable the file output by adding output.file.

Example configuration:

output.file:
  path: "/tmp/apm-server"
  filename: apm-server
  #rotate_every_kb: 10000
  #number_of_files: 7
  #permissions: 0600
  #rotate_on_startup: true
Configure the Kibana outputedit

The APM integration is required to set up and manage APM templates, policies, and pipelines. To confirm the integration is installed, APM Server will poll either Elasticsearch or Kibana on startup. When using a non-Elasticsearch output, APM Server requires access to Kibana via the Kibana endpoint.

Example configuration:

apm-server:
  kibana:
    enabled: true
    host: "https://..."
    username: "elastic"
    password: "xxx"

Configuration optionsedit

You can specify the following output.file options in the apm-server.yml config file:

enablededit

The enabled config is a boolean setting to enable or disable the output. If set to false, the output is disabled.

The default value is true.

pathedit

The path to the directory where the generated files will be saved. This option is mandatory.

filenameedit

The name of the generated files. The default is set to the Beat name. For example, the files generated by default for APM Server would be "apm-server", "apm-server.1", "apm-server.2", and so on.

rotate_every_kbedit

The maximum size in kilobytes of each file. When this size is reached, the files are rotated. The default value is 10240 KB.

number_of_filesedit

The maximum number of files to save under path. When this number of files is reached, the oldest file is deleted, and the rest of the files are shifted from last to first. The number of files must be between 2 and 1024. The default is 7.

permissionsedit

Permissions to use for file creation. The default is 0600.

rotate_on_startupedit

If the output file already exists on startup, immediately rotate it and start writing to a new file instead of appending to the existing one. Defaults to true.

codecedit

Output codec configuration. If the codec section is missing, events will be JSON encoded.

See Change the output codec for more information.