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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...