# Add custom field via Fleet

**URL:** https://discuss.elastic.co/t/add-custom-field-via-fleet/373681
**Category:** Elastic Agent
**Tags:** elastic-stack-monitoring
**Created:** [January 26, 2025, 2:11pm UTC](https://discuss.elastic.co/t/add-custom-field-via-fleet/373681 "2025-01-26T14:11:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Viktor\_Movita](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/viktor_movita/32/135707_2.png) [@Viktor\_Movita](https://discuss.elastic.co/u/Viktor_Movita)
#### Post date: [January 26, 2025, 2:11pm UTC](https://discuss.elastic.co/t/add-custom-field-via-fleet/373681/1 "2025-01-26T14:11:11Z")

</div>

Hello everyone,  
I am using Elastic Agents and managing them through the Fleet server.  
I usually add an ID to every document collected by the agent using the following option:

```auto
- add_id:
  target_field: "event.id"

```

Can I add this field using the "Custom field" option in the policy settings in the Fleet user interface in the browser, or is this option intended only for static fields (not dynamic ones)? Would I need to define it through the processors instead?

> **[Elastic Agent policies | Fleet and Elastic Agent Guide \[8.17\] | Elastic](https://www.elastic.co/guide/en/fleet/current/agent-policy.html#add-custom-fields)**

Thank you!
