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!

Free Professional Services for .conf26 Attendees

This year at .conf26, we are doing something a little different. We are bringing the best minds from ...

Defend at Machine Speed: Your Guide to Security Sessions at .conf26

Splunk .conf26   With threats moving at machine speed and attack surfaces expanding across hybrid ...

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...