I'm trying to create a grok pattern for the following formats:
October 27, 2015 03:44: lorem created a new project "lorem / ipsum"
October 27, 2015 03:48: lorem created a new project "lorem / ipsum-cp"
October 27, 2015 18:38: john created a new project "john / playgroud"
October 27, 2015 18:42: joseph created a new project "joseph / test-ci"
I couldn't find a single expression to match the full date, so I did the following:
grok {
match => { "message" => "%{MONTH:month}%{SPACE}%{NUMBER:day}, %{YEAR:year}%{SPACE}%{HOUR:hour} %{NUMBER:minute}"}
}
Thus creating a set of fields for all of the parts of the datetime stamp. Now I was wandering what would be the best way to deal with the rest of the line and to recreate a timestamp.
I was considering using a mutate to join all of the fields together and parse it through the date filter but should I rewrite the message
parameter to only the rest of the line? Like lorem created a new project "lorem / ipsum"
or leave it untouched to reflect the original line?