# Logstash parses log fine, elasticsearch throws date error?

**URL:** <https://discuss.elastic.co/t/logstash-parses-log-fine-elasticsearch-throws-date-error/66611>\
**Category:** Logstash\
**Created:** [November 19, 2016, 5:36am UTC](https://discuss.elastic.co/t/logstash-parses-log-fine-elasticsearch-throws-date-error/66611 "2016-11-19T05:36:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![encee](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@encee](https://discuss.elastic.co/u/encee)\
**Post date:** [November 19, 2016, 5:36am UTC](https://discuss.elastic.co/t/logstash-parses-log-fine-elasticsearch-throws-date-error/66611/1 "2016-11-19T05:36:12Z")

</div>

Log: 2016-11-19 05:15:34.537 [INFO] [15722:119885] Blah blah blah

Date Config:

date {  
match =\> ["timestamp" , "yyyy-MM-dd HH:mm:ss.SSS"]  
timezone =\> 'UTC'  
locale =\> 'en'  
}

Error: {:timestamp=\>"2016-11-19T05:16:05.983000+0000", :message=\>"Failed parsing date from field", :field=\>"timestamp", :value=\>"2016-11-19 05:15:34.537", :exc  
eption=\>"Invalid format: "2016-11-19 05:15:34.537" is malformed at ".537"", :config\_parsers=\>"yyyy-MM-dd HH:mm:ss Z", :config\_locale=\>"en", :level=\>  
:warn}

This is only thrown when pushed into elasticsearch, but when I run the configuration manually (bin/logstash -f config) it parses just fine.

Any ideas ?

---

<div class="post-metadata">

**Author:** ![encee](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@encee](https://discuss.elastic.co/u/encee)\
**Post date:** [November 19, 2016, 6:12am UTC](https://discuss.elastic.co/t/logstash-parses-log-fine-elasticsearch-throws-date-error/66611/2 "2016-11-19T06:12:12Z")

</div>

Looks like it had to do with a date block outside of a filter block in another configuration which must of been getting applied AFTER the configuration here said it was good.

---

<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 17, 2016, 6:12am UTC](https://discuss.elastic.co/t/logstash-parses-log-fine-elasticsearch-throws-date-error/66611/3 "2016-12-17T06:12:23Z")

</div>

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