# Filebeat: Time different between ingest time and Message log time

**URL:** <https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 29, 2021, 6:40am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394 "2021-11-29T06:40:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elie\_Sbat1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elie_sbat1/32/87812_2.png) [@Elie\_Sbat1](https://discuss.elastic.co/u/Elie_Sbat1)\
**Post date:** [November 29, 2021, 6:40am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/1 "2021-11-29T06:40:50Z")

</div>

Hello,

Currently, I am using Elasticsearch v7.11 and filebeat v7.15 And I am retrieving owa logs from a directory on exchange. I noticed that the "@timestamp" and log message was way different. After further troubleshooting using the date processor I managed to get the logs with 2 hours difference.  
I tried to assign the timezone on the date processor with no success. Check below snapshot of the log output and date processor.  
**OWA log output:**

 ![owa log output](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8ea72c47d4f3ae06a25d764b0fc2a18bd2befeb8.png)

**Date Processor config:**

 ![Date processor](https://us1.discourse-cdn.com/elastic/original/3X/b/5/b5fe3d4b569fd25d8ada036636e2a2d243782e3b.png)

Any advise how to make the both time fields with the same timing.

Thank you,  
E

---

<div class="post-metadata">

**Author:** ![FALEN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/falen/32/82754_2.png) [@FALEN](https://discuss.elastic.co/u/FALEN)\
**Post date:** [November 29, 2021, 7:33am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/2 "2021-11-29T07:33:18Z")

</div>

Kibana simulates your browsers timezone when showing "datetime" formatted fields like @timestamp.

If you can check your kibana index settings, you can see the field type of date: field. Which is probably string for your case.(Im showing timestamp field, bcs i dont have date field on my side)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8fe1c63c1c599ac9dc71a7d934270090ccf82b15.png)

You can try below options,  
-Try scripted fields in kibana index options  
-Try changing name of that field in grok, so kibana will have a new field that is "date" formatted  
-You can use reindex

---

<div class="post-metadata">

**Author:** ![Elie\_Sbat1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elie_sbat1/32/87812_2.png) [@Elie\_Sbat1](https://discuss.elastic.co/u/Elie_Sbat1)\
**Post date:** [November 29, 2021, 8:26am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/3 "2021-11-29T08:26:05Z")

</div>

Hello Ali,

Do you have the painless script for date ? Also, Shall I keep the date processor ?

---

<div class="post-metadata">

**Author:** ![FALEN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/falen/32/82754_2.png) [@FALEN](https://discuss.elastic.co/u/FALEN)\
**Post date:** [November 29, 2021, 1:50pm UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/4 "2021-11-29T13:50:10Z")

</div>

This topic can help you, i prefer the grok, its better for performance

> [@How to create a date scripted field for extracting actual date from logs?](https://discuss.elastic.co/t/how-to-create-a-date-scripted-field-for-extracting-actual-date-from-logs/167389):
>
> I want to create a date scripted field in kibana so that i can plot actual log dates in date histogram plot instead of using timestamp. My log format is: 2019-01-18 18:49:24.375 Progress: creating : resume I'm attaching code for scripted field i was trying to do painless script: new SimpleDateFormat('YYYY-MM-DD:HH:mm:ss.SSS').parse(doc['message'].value); on field creation it gives me errors that "shards failed". Please help me

---

<div class="post-metadata">

**Author:** ![Elie\_Sbat1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elie_sbat1/32/87812_2.png) [@Elie\_Sbat1](https://discuss.elastic.co/u/Elie_Sbat1)\
**Post date:** [November 30, 2021, 6:31am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/5 "2021-11-30T06:31:06Z")

</div>

Hello Ali,

The above threat has no solution and it is misleading.

---

<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, 8:31am UTC](https://discuss.elastic.co/t/filebeat-time-different-between-ingest-time-and-message-log-time/290394/6 "2021-12-28T08:31:47Z")

</div>

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