Splunk Search

Rex help

Harish2
Path Finder

From the below logs i want to capture DIM: data and CONSUMER: data using rex 
i am not sure about rex command  much, please help on this.

2023-01-22 00:12:25,234  update  [data work-0][DIM:  [123445-hfj-347384738748378] DIS:{} OIT: [done] flow: [update] {CONSUMER:  ITT |  CONSUMERID:  | STATE:  START  | REQ: GET  UPDATE} data collected for : itt
2023-01-22 00:12:25,234  update  [data work-0][DIM:  [678965-hfj-987563245678908] DIS:{} OIT: [done] flow: [update] {CONSUMER:  OIM |  CONSUMERID:  | STATE:  START  | REQ: GET  UPDATE} data collected for : OIM
2023-01-22 00:12:25,234  update  [data work-0][DIM:  [094567-hfj-986342345678769] DIS:{} OIT: [done] flow: [update] {CONSUMER:  ANBB |  CONSUMERID:  | STATE:  START  | REQ: GET  UPDATE} data collected for : anbb

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Without an indication of which part of the event is DIM data and which part is CONSUMER data, I have made a guess. Try this:

DIM:\s+\[(?<DIM>[^\]]+).+CONSUMER:\s+(?<CONSUMER>\S+)

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Without an indication of which part of the event is DIM data and which part is CONSUMER data, I have made a guess. Try this:

DIM:\s+\[(?<DIM>[^\]]+).+CONSUMER:\s+(?<CONSUMER>\S+)
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...