Our production logstash has been working for months until 7/13, starting almost exactly at 6pm UTC (the timestamp is significant).
The error message we saw was:
Failed action. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"logstash-2017.07.13", :_type=>"api", :_routing=>nil}, 2017-07-13T20:59:03.000Z 0:0:0:0:0:0:0:1 1499979543 a], :response=>{"create"=>{"_index"=>"logstash-2017.07.13", "_type"=>"api", "_id"=>"AV1W1bbXW-ZGHDu61hrH", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [view]", "caused_by"=>{"type"=>"number_format_exception", "reason"=>"For input string: \"places\""}}}}}
The error then mysteriously stopped by itself 6 hours later, at around midnight.
I extracted one of the logs from that time range and ran it through logstash locally, and realized something strange.
Here's my logstash filter:
filter {
grok {
match => { "message" => "%{INT:timestamp} %{GREEDYDATA:view}" }
}
date {
match => [ "timestamp", "UNIX" ]
}
}
This log fails:
1499979543 places
and produces the above error.
However, changing any one of these small details causes logstash to pass the log correctly, including:
- Changing the timestamp input to be outside of the 7/13 6pm-11:59pm UTC time range. For example
1499879543 places
gets parsed correctly (notice one of the 9s became an 8). - Changing the field name
view
to something else, e.g.views
orvie
. - Removing the date filter
- Changing the data type of
view
fromGREEDYDATA
toINT
and replacingplaces
in the log to a number.
We are using logstash version 2.3.2.
Does anyone have any idea what's going on here?