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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...