# Elastic Agent Enroll

**URL:** <https://discuss.elastic.co/t/elastic-agent-enroll/286026>\
**Category:** Beats\
**Tags:** elastic-agent\
**Created:** [October 6, 2021, 12:41pm UTC](https://discuss.elastic.co/t/elastic-agent-enroll/286026 "2021-10-06T12:41:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravenmx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravenmx/32/85611_2.png) [@ravenmx](https://discuss.elastic.co/u/ravenmx)\
**Post date:** [October 6, 2021, 12:41pm UTC](https://discuss.elastic.co/t/elastic-agent-enroll/286026/1 "2021-10-06T12:41:08Z")

</div>

Good Day.

Do not tell me by chance whether it is possible to add any custom field to the elastic agent, where I can leave a record when installing the agent and work with it when searching (it seems that this is impossible)

Target:  
when installing the agent, you must specify the user who is on the machine  
(hostname, users, etc. do not match [invalid search data])

considered working with environment variables, but I can't find information on how to read the value of the variable from the agent

---

<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:** [November 3, 2021, 12:41pm UTC](https://discuss.elastic.co/t/elastic-agent-enroll/286026/2 "2021-11-03T12:41:46Z")

</div>

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