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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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 ...