Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k points)

Hi, I have this (1/15/2018 3:00:32 AM)format for which I was trying to write grok pattern to separate date, time, and AM/PM, Please help. I was using the below pattern but still, don't see the proper out put when creating the index.

grok {

  match => {

      "message" => "%{MONTHDAY}/%{MONTHNUM}/%{YEAR}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601_TIMEZONE}?"

  }

}

1 Answer

0 votes
by (29.8k points)

Hi, the format that you have mentioned has month first and day after that so you'll need to adjust it like this


"%{MONTHNUM}/%{MONTHDAY}/%{YEAR}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601_TIMEZONE}?"

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...