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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...