简体   繁体   中英

Logstash - Grok filter - Is it possible to name aggregated patterns

I've got this time stamp in one of the logs

Tue Mar 29 09:47:33 2016

I've looked into the built in patterns https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns

But couldn't find an exact match.

I know I can create my custom pattern.. But I would still like to resolve it cleaner at the filter level.

I was thinking of a grok pattern in this format:

%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}

But not sure how to name it matched it to a single name

知道了...

(?<sourceTimestamp>%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM