Date Filter from DD/MMM/YYYY:hh:MM:ss to @timestamp not working


(Naresh Reddy) #1

I want to match the date and timestamp from the log file. Date from my logfile is below

07/Jun/2018:04:35:00.458

I have used grok filter to extract the information using
(?%{MONTHDAY}/%{MONTH}/%{YEAR}:%{HOUR}:%{MINUTE}:%{SECOND})

Logstash output also showing correctly.

"mytimestamp" => "07/Jun/2018:04:35:02.290",

But i am unable to set that date to the @timestamp. I have tried with the following

date
{
match => ["mytimestamp","dd/MMM/YYYY:HH:mm:ss"]
}

also

date
{
match => ["mytimestamp","dd/MMM/YYYY:HH:mm:ss.SSS"]
}

It is not working. Please help.

Thank you.
Regards,
Naresh Reddy


#2

yyyy should be lowercase. Try "dd/MMM/yyyy:HH:mm:ss.SSS"


(Naresh Reddy) #3

Thank you. It worked.


(system) #4

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