Grok pattern for timestamp with month short name

Wondering how to convert timestamps given like:

2023-mar.-20 23:44:44 PM

to @timestamp and adding a default timezone info

I think you need to pass the locale as well.

What is the locale for this date string?

I know a couple of languages abbreviate March as mar., but you need to use the correct locale because the abbreviation of other months could be different.

Right, and how to go about passing that and what std. grok patterns to use for eg. month name and 12 hour clock (AM/PM)?

Based on the example you provided it looks like you have a 24 hour clock, so AM/PM is redundant and can probably be excluded from date parsing.

1 Like

Turned out we could alter the log format of the source application to match easier/already parsed format of other data from same end point.

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