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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...