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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...