Splunk Search

Transaction command doesn't work for all events when the 'endswith' event is seen next day.

aishwaryabh
New Member

I am trying to run a transaction command for all the patrons where startswith=(Action=CardIn) endswith=(Action=CardOut). My query is:

index=* |
| transaction patron location startswith=Action=CardIn endswith=Action=CardOut keepevicted=t keeporphans=t maxspan=24h

It is not grouping the events together when CardIn event is in the afternoon and CardOut event at midnight.

maxspan doesn't seem to work here. I am using Splunk cloud instance. on specifying
the patron number in the search it works. However, on running it for all patrons it breaks.

I am running out of ideas, any help appreciated.

Tags (1)
0 Karma

to4kawa
Ultra Champion
index=your_index place=your_place
| streamstats count(eval(Action=="CardIn")) as CardIn 
| stats sum(CardIn)  by Patron_number

Hi, The search with transaction is too heavy.
We can improve if you have the expected results and the necessary sample logs on time.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

transaction is a heavy command, so is dependent on settings in limits.conf. There are other factors at play, such as maxopenevents/maxopentxn, the defaults are in limits.conf and in a default enterprise installation default to 100,000 and 5,000

These may be different in cloud. That may be relevant for you, but in general when things work at small scale and break at bigger scale, you are often coming up against Splunk default limits

0 Karma

rmmiller
Contributor

Are you sure your results for all patrons are coming back sorted in descending time order?

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...