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!

Data Management Digest – December 2025

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

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...