Splunk Search

how to get the max and min for a combination of multiple fields ?

vadud3
Path Finder
* | rex "(?<fpc>fpc\d+) (?<ichip>ICHIP\(\d+\)):Packet drop in Ichip pktwr,rate: %\S+: \d+, total: (?<err>\d+)"

How do I get the max(err) and min(err) for each combination of host, fpc, ichip ?

err is an integer number.

Tags (3)
0 Karma

ziegfried
Influencer
<your search> | stats max(err) min(err) by host,fpc,ichip

edit:

* | stats max(err) as max_err min(err) as min_err by host,fpc,ichip | eval rate=(max_err-min_err)/720 | fields - max_err min_err | sort -rate

ziegfried
Influencer

added to the answer

0 Karma

vadud3
Path Finder

how do I sort it by host with highest rate ? rate is (max(err) - min(err)) / 720

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...