Splunk Enterprise

Using "transaction" Command

daniaabujuma
Explorer

Hello Splunkers!

I am using "transaction" command to merge multiple logs based on a mutual field between them. To clarify, I have email logs, the issue is that for 1 email I receive 4 logs in the following order:

  1. from
  2. subject
  3. attachment
  4. to

They all have one field in common: id.

I am using the following transaction command: 

| transaction id startswith=from endswith=to 

 The issue is that it merges only the two logs containing "from" and "to".

Can you please verify if I am using the command correctly because I need it to also merge the logs in between not only "from" and "to".

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The transaction command is inefficient.  Consider using the stats command to group events together by id.

| stats values(*) as * by id

 

---
If this reply helps you, Karma would be appreciated.
0 Karma

daniaabujuma
Explorer

Hello @richgalloway ,

Thank you for your reply!

I tried your recommendation but unfortunately it didn't work. Do you have any other suggestions?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please explain what you mean by "it didn't work".  What results did you get and how do they compare to the expected results?

Please share sample sanitized events and the desired output.

---
If this reply helps you, Karma would be appreciated.
0 Karma
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!

Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas

    Thursday, June 25, 2026  |  11AM PDT / 2PM EDT  Duration: 1 Hour (Includes live Q&A) Register to ...

Analytics Workspace deprecation

As of Splunk Cloud Platform 10.4.2604 and Splunk Enterprise 10.4, Analytics Workspace is now deprecated. ...

Splunk Developer Day Recap: Building, Publishing, and Growing on the Splunk Platform

Splunk Developer Day brought the Splunk developer community together for a practical look at what it means to ...