Step 2: Set up and configureedit

Starting in version 8.0.0, Fleet uses the APM integration to set up and manage APM index templates, ILM policies, and ingest pipelines. APM Server will only send data to Elasticsearch after the APM integration has been installed.

Install the APM integrationedit
If you have an internet connection

An internet connection is required to install the APM integration via the Fleet UI in Kibana.

  1. Open Kibana and select Add integrations > Elastic APM.
  2. Click APM integration.
  3. Click Add Elastic APM.
  4. Click Save and continue.
  5. Click Add Elastic Agent later. You do not need to run an Elastic Agent to complete the setup.
If you don’t have an internet connection

If your environment has network traffic restrictions, there are other ways to install the APM integration. See Air-gapped environments for more information.

Option 1: Update kibana.yml

Update kibana.yml to include the following, then restart Kibana.

xpack.fleet.packages:
- name: apm
  version: latest

See Configure Kibana to learn more about how to edit the Kibana configuration file.

Option 2: Use the Fleet API

Use the Fleet API to install the APM integration. To be successful, this needs to be run against the Kibana API, not the Elasticsearch API.

POST kbn:/api/fleet/epm/packages/apm/8.14.0
{ "force": true }

See Kibana API to learn more about how to use the Kibana APIs.

Configure APMedit

Configure APM by editing the apm-server.yml configuration file. The location of this file varies by platform—​see the Installation layout for help locating it.

A minimal configuration file might look like this:

apm-server:
  host: "localhost:8200" 
output.elasticsearch:
  hosts: ["localhost:9200"] 
  username: "elastic" 
  password: "changeme"

The host:port APM Server listens on.

The Elasticsearch host:port to connect to.

This example uses basic authentication. The user provided here needs the privileges required to publish events to Elasticsearch. To create a dedicated user for this role, see Create a writer user.

All available configuration options are outlined in configuring APM Server.