# Using legacy APM setup after upgrading Elasticsearch to 8.X

**URL:** <https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351>\
**Category:** APM\
**Tags:** server\
**Created:** [April 4, 2023, 6:11pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351 "2023-04-04T18:11:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 4, 2023, 6:11pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351/1 "2023-04-04T18:11:59Z")

</div>

Hi,

I have a self-managed setup on v7.9.2 that ooks like this: Custom APM agents (hundreds) --\> load balancer --\> APM servers --\> Kafka for MQ --\> Logstash servers --\> Elasticsearch servers

I upgraded a development stack to 8.6.2. I tinkered with it for a couple of hours and got it working. I see that data is indexed to 'apm-server-8.6.2-2023.04.04' but I can't see new data in the 'APM' menu. After a while, I checked and saw that the mapping was wrong (not applied). Per the documentation, I installed the integration. I'm not sure how I can set the mapping up on a 8.X stack, I don't think copying the old template would be sufficient. Could someone help with this issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 12, 2023, 12:28pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351/2 "2023-04-12T12:28:09Z")

</div>

No takers?

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [April 24, 2023, 3:28pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351/3 "2023-04-24T15:28:21Z")

</div>

Hi @YvorL , apologies for the late reply, this somehow fell through the cracks.  
Apm server changed to write to datastreams in `8.0+`, of the format `{data_stream.type}-{data_stream.dataset}-{data_stream.namespace}`. For example this leads to datastreams such as `traces-apm-default`. If installing the apm integration, then the mappings and ILM policies are set up in accordance with this. The `namespace` part is where you can customize the datastreams. Keeping custom logic that sends data to `apm-*` indices leads to default templates not being applied. In such a case, you would need to set up templates yourself.

When using apm server standalone (not managed by Elastic Agent), sending data to Kafka/Logstash is still supported in `8.6`. But you probably want to update your logstash configuration to send the data to datastreams in alignment with the default setup. Then [installing the apm integration](https://www.elastic.co/guide/en/apm/guide/current/apm-server-configuration.html#_install_the_apm_integration) is all you have to do for templates & ILM policies to get applied.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [April 24, 2023, 5:42pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351/4 "2023-04-24T17:42:09Z")

</div>

Thanks! I can't test this, I deleted the idling dev server today and moved on to another project in the meantime.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 22, 2023, 5:43pm UTC](https://discuss.elastic.co/t/using-legacy-apm-setup-after-upgrading-elasticsearch-to-8-x/329351/5 "2023-05-22T17:43:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
