# Grok filter date error

**URL:** <https://discuss.elastic.co/t/grok-filter-date-error/196599>\
**Category:** Logstash\
**Created:** [August 23, 2019, 10:00pm UTC](https://discuss.elastic.co/t/grok-filter-date-error/196599 "2019-08-23T22:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zolthar-z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zolthar-z/32/47895_2.png) [@zolthar-z](https://discuss.elastic.co/u/zolthar-z)\
**Post date:** [August 23, 2019, 10:00pm UTC](https://discuss.elastic.co/t/grok-filter-date-error/196599/1 "2019-08-23T22:00:59Z")

</div>

Hello

My current platform is composed by filebeat-\>logstash-\>elasticsearch-\>Kibana (everything in 7.3 version) and I have configured a grok in logstash, the grok extract the time from the log and put it in the @timestamp field.

Until 2 days ago everything was working fine but suddenly I started to receive this message in logstash module:

Aug 23 21:43:04 hostname logstash[2015]: [2019-08-23T21:43:04,231][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=\>400, :action=\>["index", {:\_id=\>nil, :\_index=\>"index", :\_type=\>"\_doc", :routing=\>nil}, #LogStash::Event:0x4903369f], :response=\>{"index"=\>{"\_index"=\>"index", "\_type"=\>"\_doc", "\_id"=\>"kONuwGwB1C-6uPvz0ZdP", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception", "reason"=\>"failed to parse field [timestamp] of type [date] in document with id 'kONuwGwB1C-6uPvz0ZdP'. Preview of field's value: '2019-08-23 21:42:41,863'", "caused\_by"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"failed to parse date field [2019-08-23 21:42:41,863] with format [strict\_date\_optional\_time||epoch\_millis]", "caused\_by"=\>{"type"=\>"date\_time\_parse\_exception", "reason"=\>"Failed to parse with all enclosed parsers"}}}}}}

this is my logstash grok:

input {  
beats {  
port =\> 5044  
}  
}  
filter {  
grok {  
match =\> ["message", "%{{TIMESTAMP\_ISO8601:timestamp}"]  
}  
date {  
match =\> ["timestamp", "ISO8601"]  
}  
}  
output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"  
}

}

Please your help if maybe one of you got the same error in the past and how could fix it.

Thanks

Regards

---

<div class="post-metadata">

**Author:** ![zolthar-z](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zolthar-z/32/47895_2.png) [@zolthar-z](https://discuss.elastic.co/u/zolthar-z)\
**Post date:** [August 29, 2019, 4:29pm UTC](https://discuss.elastic.co/t/grok-filter-date-error/196599/2 "2019-08-29T16:29:15Z")

</div>

I found the issue, I was sending the logs filebeat-\>logstash-elasticsearch, when updated from 7.2.1 version to 7.3.0 elasticsearch didn't create the indes template for the new version, so I had to send the data from filebeat-\>elasticsearch, wait to create the template and revert the change, i fixed the problem, maybe it can help to another person.

Thanks

Regards.

---

<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:** [September 26, 2019, 4:29pm UTC](https://discuss.elastic.co/t/grok-filter-date-error/196599/3 "2019-09-26T16:29:18Z")

</div>

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