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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...