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!

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...