Splunk Search

Variable number in head command

gesman
Communicator

How can I return calculated (variable) number of top events?
This doesn't work:
... | eval x=5 | head x

Tags (1)
0 Karma
1 Solution

gesman
Communicator

Got it:
... | eval x=5 | streamstats c | where c<=x

View solution in original post

0 Karma

gesman
Communicator

Got it:
... | eval x=5 | streamstats c | where c<=x

0 Karma
Get Updates on the Splunk Community!

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...