Dateparsefailure on logstash

I am pulling data from sql and I have date field

I am still getting this error on output. and can't figure out where this is coming from.

                     "tags" => [
    [0] "_dateparsefailure"
],

I try without any filter and it shows up like this
"installdate0" => 2019-04-11T14:57:59.000Z

How do I parse this one? as it has T in middle.

This is what I have try so far for testing and it give me same error

echo "2019-04-11T14:57:59.000Z" | /usr/share/logstash/bin/logstash -e 'input { stdin {} } filter { date { match => [ "message", "yyyy-MM-dd HH:mm:ss.SSSZ"] } }'

I also try this but it does not even print anything it just error outs on java

echo "2019-04-11T14:57:59.000Z" | /usr/share/logstash/bin/logstash -e 'input { stdin {} } filter { date { match => [ "message", "yyyy-MM-ddTHH:mm:ss.SSSZ"] } }'

Looks like I am not parsing this T in middle?

If that is the output of a rubydebug codec then you will not be able to parse it using a date filter, nor do you need to. There are no quotes around 2019-04-11T14:57:59.000Z, so it is not a string, it is already a LogStash::Timestamp. The jdbc input can automatically parse date columns into dates, so that you do not need to use a date filter.

perfect. I just dump that in index and created template to confirm and it is date field.

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