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!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Community Content Calendar, October Edition

Welcome to the October edition of our Community Spotlight! The Splunk Community is a treasure trove of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...