Splunk Search

Adding an event field to Stats Min command

petem3
New Member

When calculating a minimum value across events how can you then retain an event field related to the minimum value and display the minimum value with the event field?   

Labels (1)
0 Karma

thambisetty
SplunkTrust
SplunkTrust
| eventstats min(field) as min_field
| where field=min_field
| table _time, field
————————————
If this helps, give a like below.
0 Karma

petem3
New Member

I am trying to show the event date related to the min field value, along with the minimum value. 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It would help to see your current query, but I think you want to try the eventstats command.

---
If this reply helps you, Karma would be appreciated.
0 Karma

thambisetty
SplunkTrust
SplunkTrust

eventstats 

| eventstats min(fieldname) 

https://youtu.be/vq3h9Qo5UPY

————————————
If this helps, give a like below.
0 Karma
Get Updates on the Splunk Community!

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...

Join Us at the Builder Bar at .conf24 – Empowering Innovation and Collaboration

What is the Builder Bar? The Builder Bar is more than just a place; it's a hub of creativity, collaboration, ...

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...