Splunk Search

Group together different fields found on different lines, based on a common field

RecoMark0
Path Finder

Hello,
I would like to group together different fields found on different lines, based on a common field that is found on all lines.

Example Log Lines

2014-03-25 13:45:38,003 - [123456789] Incoming Search Request: project=Project01

2014-03-25 13:45:38,003 - [123456789] count=456, executionTime=334



2014-03-25 13:47:31,012 - [987654321] Incoming Search Request: project=Project02

2014-03-25 13:47:31,012 - [987654321] count=8784, executionTime=1145

I would like to create a table from these lines that looks like:

Project ID count executionTime
Project01 123456789 456 334
Project02 987654321 8784 1145

Is this possible? The only examples I have found, the values to group are always on every line, where as some of my fields only appear on the first or second line.

Tags (3)
0 Karma
1 Solution

somesoni2
Revered Legend

Try this

your base search | transaction ID startswith="project=*" endswith="executionTime=*" | table project, ID, count,executionTime

View solution in original post

somesoni2
Revered Legend

Try this

your base search | transaction ID startswith="project=*" endswith="executionTime=*" | table project, ID, count,executionTime

RecoMark0
Path Finder

Awesome! That worked perfectly. Thank you!

0 Karma

RecoMark0
Path Finder

I have seen as many as 9 lines for a unique ID, but usually it is only 2 or 3 lines

0 Karma

somesoni2
Revered Legend

For one ID, is there only two events or there can be more?

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...