Can metricbeat copy fields from basic fields like event or agent?

Hi experts,

I'd like to copy the host name to event root when using system module.

- copy_fields:
    fields:
      - from: agent.name
        to: name
    fail_on_error: true
    ignore_missing: false

Output is:

"ecs": {
"version": "1.5.0"
},
"agent": {
"ephemeral_id": "xxx",
"id": "xxx",
"name": "xxx",
"type": "metricbeat",
"version": "7.8.0",
"hostname": "xxx"
},
"system": ...

But I got the error msg saying "Failed to copy fields in copy_fields processor: could not fetch value for key: agent.name, Error: key not found"

Any idea about it?

Thanks

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