The new APM ecosystem offers a number of benefits:
- A single, unified way to add monitoring for logs, metrics, traces, and other types of data to each host — install one thing instead of multiple
- Central, unified configuration management — no need to edit multiple configuration files
- Reduced number of fields per index, better space efficiency, and faster queries
- More granular data control
- Errors and metrics data streams are shared with other data sources — which means better long-term integration with the logs and metrics apps
- Removes template inheritance for ILM policies and makes use of new Elasticsearch index and component templates
resource 'apm-7.17.13-$type' exists, but it is not an alias
- Easier to install APM on edge machines
- Improved source map handling and APM agent configuration management
- Less configuration
- Easier and less error-prone upgrade path
- Zero-downtime configuration changes
APM integration architectureedit
The Elastic APM integration consists of four components: APM agents, the Elastic APM integration, Elasticsearch, and Kibana. Generally, there are two ways that these four components can work together:
APM agents on edge machines send data to a centrally hosted APM integration:
Or, APM agents and the APM integration live on edge machines and enroll via a centrally hosted Elastic Agent:
In order to collect data from RUM and mobile agents, which run in browser and mobile applications, you must run Elastic Agent centrally. For other applications, such as backend services, Elastic Agent may be co-located on the edge machine.
There are some limitations to be aware of:
- This change cannot be reverted
- Currently, only the Elasticsearch output is supported
- APM runs under Elastic Agent which, depending on the installation method, might be require root privileges
- An Elastic Agent with the APM integration enabled must be managed by Fleet.
Switch a self-managed clusteredit
Upgrade the Elastic Stackedit
The Elastic Stack (Elasticsearch and Kibana) must be upgraded to version 7.14 or higher. See the Elastic Stack Installation and Upgrade Guide for guidance.
Add a Fleet Serveredit
Fleet Server is a component of the Elastic Stack used to centrally manage Elastic Agents. The APM integration requires a Fleet Server to be running and accessible to your hosts. Add a Fleet Server by following this guide.
After adding your Fleet Server host and generating a service token, the in-product help in Kibana will provide a command to run to start an Elastic Agent as a Fleet Server. Commands may require administrator privileges.
Verify Fleet Server is running by navigating to Fleet > Agents in Kibana.
Install a Fleet-managed Elastic Agentedit
It’s possible to install the Elastic APM integration on the same Elastic Agent that is running the Fleet Server integration. For this use case, skip this step.
The Fleet-managed Elastic Agent will run the Elastic APM integration on your edge nodes, next to your applications. To install a Fleet-managed Elastic Agent, follow this guide.
Add the APM integrationedit
The APM integration receives performance data from your APM agents, validates and processes it, and then transforms the data into Elasticsearch documents.
To add the APM integration, see Step 3: Add the APM integration. Only complete the linked step (not the entire quick start guide). If you’re adding the APM integration to a Fleet-managed Elastic Agent, you can use the default policy. If you’re adding the APM integration to the Fleet Server, use the policy that the Fleet Server is running on.
You’ll configure the APM integration in this step. See Input settings for a reference of all available settings. As long as the APM integration is configured with the same secret token or you have API keys enabled on the same host, no reconfiguration is required in your APM agents.
Stop the legacy APM Serveredit
Once data from upgraded APM agents is visible in the APM app, it’s safe to stop the legacy APM Server process.
Congratulations — you now have the latest and greatest in Elastic APM!
Switch an Elastic Cloud clusteredit
Upgrade the Elastic Stackedit
Use the Elastic Cloud console to upgrade the Elastic Stack to version 7.17.13. See the Elasticsearch Service upgrade guide for details.
Switch to Elastic Agentedit
APM data collection will be interrupted while the migration is in progress. The process of migrating should only take a few minutes.
With a Superuser account, complete the following steps:
In Kibana, navigate to Observability > APM > Settings > Schema.
Click Switch to Elastic Agent. Make a note of the
apm-server.ymluser settings that are incompatible with Elastic Agent. Check the confirmation box and click Switch to Elastic Agent.
Elastic Cloud will now create a Fleet Server instance to contain the new APM integration, and then will shut down the old APM server instance. Within minutes your data should begin appearing in the APM app again.
Configure the APM integrationedit
You can now update settings that were removed during the upgrade. See Input settings for a reference of all available settings.
In Kibana, navigate to Mangement > Fleet. Select the Elastic Cloud Agent Policy. Next to the Elastic APM integration, select Actions > Edit integration.
Scale APM and Fleetedit
Certain Elasticsearch output configuration options are not available with the APM integration. To ensure data is not lost, you can scale APM and Fleet up and out. APM’s capacity to process events increases with the instance memory size.
Go to the Elastic Cloud console, select your deployment and click Edit. Here you can edit the number and size of each availability zone.
Congratulations -- you now have the latest and greatest in Elastic APM!