# Problem with @timestamp time in indexes

**URL:** <https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 5, 2020, 11:47am UTC](https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280 "2020-03-05T11:47:41Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 9, 2020, 5:38pm UTC](https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280/21 "2020-03-09T17:38:04Z")

</div>

I see.

I believe that `json.keys_under_root: true` writes:

```auto
{
   "@timestamp":"2020-03-06T20:18:23.894670031Z",
   "exportable":true,
   "level":"info",
   "message":"Get full report request",
   "report_uuid":"bf0f8a56-4a46-4cf1-8706-491b3607eaf3",
   "username":"_eva.vls_"
}

```

Then filebeat adds its metadata and writes:

```auto
{
   "@timestamp":"2020-03-06T20:18:29.973Z",
   "log":{
      "file":{
         "path":"/var/log/report-generator/report-generator.log"
      },
      "offset":14310474576
   },
   "report_uuid":"bf0f8a56-4a46-4cf1-8706-491b3607eaf3",
   "input":{
      "type":"log"
   },
   "ecs":{
      "version":"1.1.0"
   },
   "exportable":true,
   "level":"info",
   "message":"Get full report request",
   "host":{
      "name":"1ps-api"
   },
   "agent":{
      "hostname":"1ps-api",
      "id":"448f24c9-d971-4558-8651-b57f65cc4de2",
      "version":"7.4.2",
      "type":"filebeat",
      "ephemeral_id":"9bf7ff2d-3c39-4e04-8b8d-d2fe300d4f3e"
   },
   "username":"_eva.vls_"
}

```

So `@timestamp` gets overwritten.

You probably need to set `overwrite_keys: true`. See [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-config-json](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#filebeat-input-log-config-json)

---

<div class="post-metadata">

**Author:** ![Vinnyard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinnyard/32/63886_2.png) [@Vinnyard](https://discuss.elastic.co/u/Vinnyard)\
**Post date:** [March 10, 2020, 6:46am UTC](https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280/22 "2020-03-10T06:46:37Z")

</div>

Hurray )) It's working )) Thank you very much )

---

<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:** [April 7, 2020, 6:46am UTC](https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280/23 "2020-04-07T06:46:39Z")

</div>

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

[Previous page](https://discuss.elastic.co/t/problem-with-timestamp-time-in-indexes/222280.md?page=1)
