# Filebeat new timestamp field

**URL:** <https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 29, 2018, 5:06pm UTC](https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970 "2018-04-29T17:06:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_Deren](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dominik\_Deren](https://discuss.elastic.co/u/Dominik_Deren)\
**Post date:** [April 29, 2018, 5:06pm UTC](https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970/1 "2018-04-29T17:06:07Z")

</div>

Hey,

I'm pushing logs from my application into Elasticsearch using Filebeat agent installed on my app's machine. Logs that my application generates contain a field called `timestamp` that contains the datetime string defining when the log line was generated. It is formatted like this `Sun, 29 Apr 2018 16:19:45:825 GMT`.

In Kibana, when creating the index pattern, I can only select the default `@timestamp` field to be used as the time of the events. But this field is generated (I assume) by filebeat as a value when given log line was read from the log file. This is problematic for me, coz it creates a time discrepancy in the logs that I view in Kibana, and some log messages are displayed in incorrect order.

Is there a way to tell filebeat to read the value of @timestamp from my log files, rather than setting this value to the time when logs are uploaded? Or is there a way to define new field `real_timestamp` can I could use as a time field when configuring my index pattern?

I've been going through filebeat documentation, but wasn't able to find a way to do it.

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 30, 2018, 9:58am UTC](https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970/2 "2018-04-30T09:58:50Z")

</div>

When using elasticsearch as output, you can define [ingest processor pipelines](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/ingest-processors.html) and [use them to parse logs sent by filebeat](https://www.elastic.co/guide/en/beats/filebeat/current/configuring-ingest-node.html).

You can find some example pipelines that do something similar to what you need in the filebeat modules themselves, for example the kafka module in [its pipeline](https://github.com/elastic/beats/blob/v6.2.4/filebeat/module/kafka/log/ingest/pipeline.json#L45) replaces the filebeat `@timestamp` field with the result of parsing the `kafka.log.timestamp` field as a date.

---

<div class="post-metadata">

**Author:** ![Dominik\_Deren](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dominik\_Deren](https://discuss.elastic.co/u/Dominik_Deren)\
**Post date:** [May 1, 2018, 12:09am UTC](https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970/3 "2018-05-01T00:09:24Z")

</div>

Great, thanks very much, this worked perfectly!

---

<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 29, 2018, 12:09am UTC](https://discuss.elastic.co/t/filebeat-new-timestamp-field/129970/4 "2018-05-29T00:09:25Z")

</div>

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