Convert monthname to monthnumber in logstash configuration file

Hi,

First of all, I am very new to this elastic search and logstash. Excuse me If it sounds simple.
I am having issue with logstash conf file. Currently my date format is "Wed Feb 15 08:05:50 2017". I wrote filter to match format as below

match=>["message","Log started at: %{WORD}%{SPACE}%{MONTH:month}%{SPACE}%{MONTHDAY:day}%{SPACE}%{HAPROXYTIME:time}%{SPACE}%{YEAR:year}"]

It seems fine but I am getting month value as Feb. I need to convert this as 2 (I mean get month number instead of month name) to create timestamp.

Could you please help me how to convert this? Please ask me if you have any questions. Any sample code to do this please send me. Thanks.

Use the date filter to parse strings into timestamps. A date pattern like "ddd MMM dd HH:mm:ss YYYY" can be used to parse the string in question.

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