Splunk Search

Using "stats max(foo)", is it possible to get the whole line of the log that contains the max value of foo?

viggor
Path Finder

When I use | stats max(foo) I get the largest value of foo.

Is it possible to get the whole line of the log which contain this largest value?

0 Karma
1 Solution

sundareshr
Legend

Try like this

... | eventstats max(foo) as maxfoo | where foo=maxfoo | table _raw foo

View solution in original post

0 Karma

sundareshr
Legend

Try like this

... | eventstats max(foo) as maxfoo | where foo=maxfoo | table _raw foo
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...