Logstash date filter convert @timestamp to timestamp in log file issue

I am trying to convert the log file time stamp to @timestamp, but it is not working.

Following is the date in the job log:
"2019-08-20T11:52:18.4906519-04:00"

Following is the date filter:
date { # use timestamp from the log
match => [ "timeStamp", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ" ] #"2019-08-20T11:52:18.4906519-04:00"
target => "@timestamp"
}

I believe the issue is with the format, I have tried many but none seem to work.

If you have seven digits after the decimal in your timeStamp you need seven S to match

date { match => [ "timeStamp", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZZ" ] }

Thanks Badger, that worked. Thought I tried that, but guess not.

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