Splunk Search

How to fetch relevant data from the different log lines based on a unique ID ?

2chs
Explorer
 
 

Hi There,

I need to fetch some data based on a unique ID from the different log lines can you please help me with the search query.

Example for relevant logs with unique ID will be:

Time=DDMMY ID=001 INFO Requester=Bob

Time=DDMMY ID=001 INFO Request Type=Normal

Time=DDMMYY ID=001 INFO Request Status=success

 

So, need them in this format

Time                ID   Requester Request Type Request Status

DDMMYY        001       Bob               Normal              Success

 

Please Help. Thanks in advance.

 

Labels (6)
0 Karma

to4kawa
Ultra Champion
index=_internal | head 1 | fields _raw
| eval _raw="Time=DDMMY ID=001 INFO Requester=Bob
Time=DDMMY ID=001 INFO Request Type=Normal
Time=DDMMYY ID=001 INFO Request Status=success"
| multikv noheader=t 
| table _raw
| rex "(?<comment>(?# the logic))"
| kv
| stats last(Time) as Time values(Requester) as Requester values(Type) as  Request_Type values(Status) as Request_Status by ID
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...