Splunk Search

Using subsearches to get highest value

markthompson
Builder

Hello,
I have a search that tables certain values from my data fields, although i wish to create a new field on all events called Maximum that gets the latest value of a field called max and another called min

Tags (2)
1 Solution

mzorzi
Splunk Employee
Splunk Employee

You can use eventstats:

index=_internal | eventstats max(date_second) AS MAX min(date_second) as MIN | table date_second,MAX,MIN

View solution in original post

mzorzi
Splunk Employee
Splunk Employee

You can use eventstats:

index=_internal | eventstats max(date_second) AS MAX min(date_second) as MIN | table date_second,MAX,MIN

markthompson
Builder

Hi mzorzi,

Thanks for your response.

I used eventstats but I also wanted to get values from the search and table them as well.
Do you know how?

0 Karma

MuS
Legend

Could you provide the search and if possible some sample data?

0 Karma
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...