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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...