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!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...