# How could I reserve message filed with json.keys\_under\_root is set

**URL:** <https://discuss.elastic.co/t/how-could-i-reserve-message-filed-with-json-keys-under-root-is-set/290275>\
**Category:** Beats\
**Tags:** docker, filebeat\
**Created:** [November 26, 2021, 11:02am UTC](https://discuss.elastic.co/t/how-could-i-reserve-message-filed-with-json-keys-under-root-is-set/290275 "2021-11-26T11:02:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xxdoor](https://avatars.discourse-cdn.com/v4/letter/x/e47c2d/32.png) [@xxdoor](https://discuss.elastic.co/u/xxdoor)\
**Post date:** [November 26, 2021, 11:02am UTC](https://discuss.elastic.co/t/how-could-i-reserve-message-filed-with-json-keys-under-root-is-set/290275/1 "2021-11-26T11:02:04Z")

</div>

Hi, I'm using filebeat to collect my logs from servers.

I'm confused whether it's possible to reserve message filed when I set json.keys\_under\_root true.

The fields I hava set:

```auto
- type: docker
  containers:
    path: "/mnt/data/docker/data/containers"
    ids:
      - "*"
  json:
    keys_under_root: true
    overwrite_keys: true

```

After set these fields, the message field disappeared, I want reserve both message fields and the json function.

Hope to get replys!

---

<div class="post-metadata">

**Author:** ![xxdoor](https://avatars.discourse-cdn.com/v4/letter/x/e47c2d/32.png) [@xxdoor](https://discuss.elastic.co/u/xxdoor)\
**Post date:** [November 30, 2021, 7:35am UTC](https://discuss.elastic.co/t/how-could-i-reserve-message-filed-with-json-keys-under-root-is-set/290275/2 "2021-11-30T07:35:22Z")

</div>

Why nobody reply ☹

---

<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:** [December 28, 2021, 9:36am UTC](https://discuss.elastic.co/t/how-could-i-reserve-message-filed-with-json-keys-under-root-is-set/290275/3 "2021-12-28T09:36:13Z")

</div>

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