Splunk Search

max after stats, chart

jrodriguezap
Contributor

Hi, I have a result that comes from: search ... | stats count by MB

MB   count
3.1   4
2.8   2
3.6   1
2.3   5
3.5   1

I would get the count value has more:

MB   count
2.3   5

With that it would be possible?
I appreciate your help.
Greetings.

Tags (2)
0 Karma
1 Solution

sowings
Splunk Employee
Splunk Employee

In this case, I would set up a new field with eventstats (it leaves the original set alone), and then search for where they're equal:


YOUR_SEARCH_HERE | stats count by MB | eventstats max(count) AS max | where count=max

View solution in original post

sowings
Splunk Employee
Splunk Employee

In this case, I would set up a new field with eventstats (it leaves the original set alone), and then search for where they're equal:


YOUR_SEARCH_HERE | stats count by MB | eventstats max(count) AS max | where count=max

jrodriguezap
Contributor

Thank you. I was of help, I had to add the same for the MB column, because when he heard the count for several MB, leaving several.

...| stats count by MB | eventstats max(count) AS maxCount | where count=maxCount | eventstats max(MB) AS maxMB| where MB=maxMB | fields MB
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...