Splunk Search

Finding the minimum and maximum value

jvmerilla
Path Finder

Hi All,

I have 3 files in one index, Cycle 10.csv, Cycle 11.csv, and Cycle 12.csv.

All of the 3 files have a "Cycle Number" fields with values:
10 for Cycle 10.csv

11 for Cycle 11.csv
12 for Cycle 12.csv

The Cycle Number field is just an indicator for each cycle to be able to identify the previous and the current cycle.

What I want to do is, first, to search the top 2 values of the Cycle Number field.
So, I am expecting that it would return only the Cycle 11.csv and Cycle 12.csv
Then, I would like to have a separate search for the Cycle Number with minimum value(Cycle 11.csv) and maximum values(Cycle 12.csv)

How would I be able to do this?

Thanks in advance and best regards. 🙂

Tags (3)
0 Karma

valiquet
Contributor

|inputlookups 10.csv | append [11.csv] | append [12.csv] | sort - | head 2

0 Karma
Get Updates on the Splunk Community!

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

Introducing the 2024 SplunkTrust!

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