# Field named "agent", introduced in 7.0.0 is in conflict with our fields

**URL:** <https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 22, 2019, 2:06pm UTC](https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862 "2019-04-22T14:06:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesusgn90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jesusgn90/32/26998_2.png) [@jesusgn90](https://discuss.elastic.co/u/jesusgn90)\
**Post date:** [April 22, 2019, 2:06pm UTC](https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862/1 "2019-04-22T14:06:57Z")

</div>

Hi guys, adapting our integration (Wazuh) for Elastic 7.0 I've noticed that Filebeat is using a field named "agent" which is in conflict with our field "agent". Our events have `agent.id`, `agent.name` along other `agent.*` fields.

Is there a way to rename the Filebeat fields to `filebeat-agent` or something else? If so, It may break something related to the Elastic stack? What's the best solution from your view?

I've seen [https://www.elastic.co/guide/en/beats/filebeat/current/exported-fields-ecs.html#\_agent\_fields](https://www.elastic.co/guide/en/beats/filebeat/current/exported-fields-ecs.html#_agent_fields)

We need the field `agent` for us... if possible...

Best regards,  
Jesús

---

<div class="post-metadata">

**Author:** ![jesusgn90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jesusgn90/32/26998_2.png) [@jesusgn90](https://discuss.elastic.co/u/jesusgn90)\
**Post date:** [April 22, 2019, 2:21pm UTC](https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862/2 "2019-04-22T14:21:39Z")

</div>

Here is my config:

```auto
filebeat.inputs:
  - type: log
    paths:
     - "/var/ossec/logs/alerts/alerts.json"
    json.message_key: log
    json.keys_under_root: true
    json.overwrite_keys: true

output:
 logstash:
   # The Logstash hosts
   hosts: ["localhost:5000"]

```

As I can see [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-reference-yml.html](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-reference-yml.html), our JSON keys should overwrite Filebeat's fields.

What I'm missing?

Regards

---

<div class="post-metadata">

**Author:** ![jesusgn90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jesusgn90/32/26998_2.png) [@jesusgn90](https://discuss.elastic.co/u/jesusgn90)\
**Post date:** [April 23, 2019, 10:30am UTC](https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862/3 "2019-04-23T10:30:16Z")

</div>

Hi guys, after some painful hours, I figured out how to achieve my goal, here is my new config:

```auto
filebeat.inputs:
  - type: log
    paths:
     - "/var/ossec/logs/alerts/alerts.json"

processors:
  - decode_json_fields:
      fields: ["message"]
      process_array: true
      max_depth: 200
      target: ""
      overwrite_keys: true
  - drop_fields:
      fields: ["message", "ecs"]

output:
 logstash:
   hosts: ["localhost:5000"]

```

It does exactly what I want, I hope it helps to other users that may be facing the same issue.

Best regards,  
Jesús

---

<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 21, 2019, 10:30am UTC](https://discuss.elastic.co/t/field-named-agent-introduced-in-7-0-0-is-in-conflict-with-our-fields/177862/4 "2019-05-21T10:30:24Z")

</div>

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