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.

Get Updates on the Splunk Community!

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 ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...