Splunk Search

transaction command searchs according to replaced "_time" ?

crazyeva
Contributor

XXX | streamstats count | eval _time=count | sort _time | transaction maxspan=5s

I found "tranaction" is still using original "_time" but not repaced "_time" as "count"
How could I force transaction use replaced "_time"

Or I want to devide and group events by a certain number of them in order like:
No.1,2,3,4,5
6,7,8,9,10
11,12,13,14,15

Tags (1)
0 Karma
1 Solution

Ayn
Legend

Use bucket instead.

... | bucket count span=5 | stats values(...) by count

View solution in original post

Ayn
Legend

Use bucket instead.

... | bucket count span=5 | stats values(...) by count

Ayn
Legend

That idea is horribly ugly, I wrote that more in the "purely technical it could work in some weird situations" sense rather than as an actual suggestion. 🙂

0 Karma

crazyeva
Contributor

thank you! perfectly solved
but did you remember you have helped me:
http://splunk-base.splunk.com/answers/53991/can-i-transaction-a-search-with-a-range-field-not-strict...
when you said:"
.........
The only way I could think of is to violate the _time somehow by writing perduration to _time and let transaction operate on that.
"
I wished that could work! that may be quite useful

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...