Splunk Search

Transaction command not returning results

ssaenger
Communicator

I would like to extract from my log file user details on how many time they have had a request to the SGW where the number of times is gretaer than 1.
I would like to make a table showing the user_id and number of times they made the request.

i would also like to do a total count of users with more than 1 request.

I thought transaction would do this, however its not resolving any results and seems to be very slow when running the search.

index=sgw sourcetype=sgw_log Request_type=Open TxType=Request | transaction user_id | where eventcount>1 | table user_id eventcount

thanks,

Tags (2)
0 Karma

lguinn2
Legend

You don't need the transaction command for this. I would avoid using the transaction command, if possible, because it is not nearly as efficient as stats.

 index=sgw sourcetype=sgw_log Request_type=Open TxType=Request 
| stats count as request_count by user_id 
| appendpipe [ stats count(eval(request_count>1)) as "Users with Multiple Requests") ]

If you only want to list the users with multiple requests:

 index=sgw sourcetype=sgw_log Request_type=Open TxType=Request 
| stats count as request_count by user_id 
| where request_count > 1
|  appendpipe [ stats count as "Users with Multiple Requests") ]
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...