# Expecting 'EOF', got 'OPEN\_ENDBLOCK' when attempting to to set up APM in Fleet

**URL:** <https://discuss.elastic.co/t/expecting-eof-got-open-endblock-when-attempting-to-to-set-up-apm-in-fleet/380422>\
**Category:** Kibana\
**Tags:** infrastructure-observability\
**Created:** [July 24, 2025, 12:05pm UTC](https://discuss.elastic.co/t/expecting-eof-got-open-endblock-when-attempting-to-to-set-up-apm-in-fleet/380422 "2025-07-24T12:05:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![garetharmstrong](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@garetharmstrong](https://discuss.elastic.co/u/garetharmstrong)\
**Post date:** [July 24, 2025, 12:05pm UTC](https://discuss.elastic.co/t/expecting-eof-got-open-endblock-when-attempting-to-to-set-up-apm-in-fleet/380422/1 "2025-07-24T12:05:50Z")

</div>

I'm trying to set up an APM Integration to work with my Fleet servers, and when I set up the Agent Policy as per the instructions, when I save, I get this error

Error while compiling agent template: Parse error on line 26: ...}include\_xml: true{{/if}}{{#if proces ---------------------^ Expecting 'EOF', got 'OPEN\_ENDBLOCK'

Anyone have any ideas what might be going wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 24, 2025, 7:01pm UTC](https://discuss.elastic.co/t/expecting-eof-got-open-endblock-when-attempting-to-to-set-up-apm-in-fleet/380422/2 "2025-07-24T19:01:42Z")

</div>

Hi @garetharmstrong

You will need to provide a little more detail on how you are trying to set this up...

What version are you on?

How are you deploying the Elastic Stack?

> I set up the Agent Policy as per the instructions,

Can you share what instructions you are following?

When and where are you getting message at what step?
