Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Reference/
  3. Ingestion tools/
  4. Fleet and Elastic Agent/
  5. Agent processors

Move fields

Themove_fields processor moves event fields from one object into another. It can also rearrange fields or add a prefix to fields.

The processor extracts fields fromfrom, then usesfields andexclude as filters to choose which fields to move into theto field.

For example, given the following event:

{  "app": {    "method": "a",    "elapsed_time": 100,    "user_id": 100,    "message": "i'm a message"  }}

To movemethod andelapsed_time into another object, use this configuration:

processors:  - move_fields:      from: "app"      fields: ["method", "elapsed_time"],      to: "rpc."

Your final event will be:

{  "app": {    "user_id": 100,    "message": "i'm a message",    "rpc": {      "method": "a",      "elapsed_time": 100    }  }}

To add a prefix to the whole event:

{  "app": { "method": "a"},  "cost": 100}

Use this configuration:

processors:  - move_fields:      to: "my_prefix_"

Your final event will be:

{  "my_prefix_app": { "method": "a"},  "my_prefix_cost": 100}
NameRequiredDefaultDescription
fromnoWhich field you want extract. This field and any nested fields will be moved intoto unless they are filtered out. If empty, indicates event root.
fieldsnoWhich fields to extract fromfrom and move toto. An empty list indicates all fields.
ignore_missingnofalseIgnore "not found" errors when extracting fields.
excludenoA list of fields to exclude and not move.
toyesThese fields extract fromfrom destination field prefix theto will base on fields root.

[8]ページ先頭

©2009-2026 Movatter.jp