Splunk Search

Transaction for events with the same field value

soller
New Member

I am a beginner in Splunk.
I have a log file with events related to the creation of some products, identified by ID1, ID2, ..., as in the sample below:

    2014-08-27T09:44:33 created product with ID1
    2014-08-27T09:44:34 Product ID1 handed off to Subsystem
    2014-08-27T09:44:35 polling Subsystem for ID1
    2014-08-27T09:44:36 created product with ID2 
    2014-08-27T09:44:37 polling Subsystem for ID1
    2014-08-27T09:44:38 ID1 status - waiting
    2014-08-27T09:44:38 Product ID2 handed off to Subsystem
    2014-08-27T09:44:39 polling Subsystem for ID2
    2014-08-27T09:44:40 ID2 status - waiting
    2014-08-27T09:44:41 polling Subsystem for ID1
    2014-08-27T09:44:42 polling Subsystem for ID2
    2014-08-27T09:44:43 ID2 status - waiting
    2014-08-27T09:44:44 ID1 status – waiting
    2014-08-27T09:44:45 polling Subsystem for ID1
    2014-08-27T09:44:46 polling Subsystem for ID2
    2014-08-27T09:44:47 ID1 status - completed
    2014-08-27T09:44:48 ID2 status – waiting
    2014-08-27T09:44:49 polling Subsystem for ID2
    2014-08-27T09:44:50 ID2 status – waiting
    2014-08-27T09:44:51 polling Subsystem for ID2
    2014-08-27T09:44:52 ID2 status – completed

Is it possible to create a transaction that contains only the events related to the same product identifier (e.g. only the lines that contains ID1)?
I don't know how to isolate the events by product ID in a transaction.
Thank you for any idea.

Tags (1)
0 Karma
1 Solution

yannK
Splunk Employee
Splunk Employee

use a field extraction to create a anew field that will contain ID1 or ID2 etc...
then use the transaction on this field.

example :
* | rex "(with|for|\d+) (?<_ID_>ID\d+)" | transaction _ID_

PS : I added the underscore around ID to avoid html formatting, you can remove them.

View solution in original post

Chubbybunny
Splunk Employee
Splunk Employee

Thanks Yann!

0 Karma

yannK
Splunk Employee
Splunk Employee

use a field extraction to create a anew field that will contain ID1 or ID2 etc...
then use the transaction on this field.

example :
* | rex "(with|for|\d+) (?<_ID_>ID\d+)" | transaction _ID_

PS : I added the underscore around ID to avoid html formatting, you can remove them.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...