Getting Data In

How to make transaction command take earliest event as startswith

power12
Communicator

Hello Splunkers ,

 

I am trying to build a query where I am using a transaction command which starts with MST and endswith Boot timestamp

 

| transaction host startswith="Starting MST" endswith="B timestamp:" maxspan=15m keepevicted=1

 

But in the raw events I have two events which starts with MST and I want to take the first one..but the transaction command takes the latest instead of earliest...how can I make the transaction command use earliest startswith event

2023-05-25T15:03:28.506750-07:00 ABC log-.sh[20252]: Starting MST (sftware) driver set

2023-05-25T15:03:38.455201-07:00 ABC log-.sh[22116]: Starting MST (sftware) driver set

2023-05-25T15:04:11.372010-07:00 ABC log-.sh[24041]: B timestamp: 2023-05-25 14:59:16


2023-05-25T15:04:11.367392-07:00 ABC log-.sh[24041]: SN: 16234567890

Thanks in Advance

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

That is the nature of transaction.  Because it sees events in reverse time order, it assumes the first "MST" it sees (the latest one), is the one that it wants.  There is no setting that changes that.

You may be able to use other fields to force it into picking another MST event.  Perhaps the number in brackets can be used to pair the endswith with the right startswith.

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

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