Splunk Search

Group all events by same transaction

thinksplunk
Engager

2013-09-25 23:23:34 .....TransactionID=abc
2013-09-25 14:23:34 .....TransactionID=dec
2013-09-24 05:42:53......TransactionID=dec
2013-09-22 12:42:53......TransactionID=abc
2013-09-12 12:42:53......TransactionID=ads
If i need group all event by TransactionID as show below, what will be the search command? Thks

TransactionID Time
abc 2013-09-25 23:23:34.....
2013-09-22 12:42:53.....
dec 2013-09-25 14:23:34....
2013-09-24 05:42:53......
ads 2013-09-12 12:42:53......

Tags (2)
0 Karma

kristian_kolb
Ultra Champion

The command is transaction.

...| transaction TransactionID | ...

It's quite well documented in the Search Reference manual.

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction


UPDATE:

aholzer has an excellent point. And if that grouping is all you want to do, stats is far more efficient, e.g;

...| stats list(_time) by TransactionID | ...

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats

/K

thinksplunk
Engager

yes i thought the command ...| transaction TransactionID | ... will return the correct results but it is not. If use ...TransactionID..., it will return the correct results, how come?

0 Karma

aholzer
Motivator

Transaction is a pretty calculation intensive command to use. So make sure you read up all the different options to shrink how long transactions are kept open for.

For example, maxspan, maxwait, endswith, startswith, are all great ways to make the transaction command a lot more efficient.

Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...