Dashboards & Visualizations

Summary row listing minimum value

adent
Explorer

I am trying to get individual values and add a summary row with the minimum value. In this case I have 3 times and want the output to have all three times and create a minimum time row (labelname=min).

event    _time

a          10:00

b           11:00
c            10:30

min    10:00

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| appendpipe
  [| stats min(_time) as _time
  | eval event="min"]
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @adent,

Only one question, if you have events in more days, an event at previous day 23.59 is earlier than an event at second day 1.30, but calculatig min on the time value it's different.

Do you want to calculate min only on time or the earliest timestamp? 

If min on time, you should run something like this:

<your_search>
| eval Time=strftime(_time,"%H.%M")
| stats min(Time) AS Time BY event
| append [ search <your_search> | eval Time=strftime(_time,"%H.%M") | stats min(Time) AS Time
| eval Time=strftime(Time,"%H.%M")

if the earliest timestamp, you could try something like this:

<your_search>
| stats earliest(_time) AS Time BY event
| append [ search <your_search> | stats earlieste() AS _time
| eval _time=strftime(_time,"%Y-%m-%d %H.%M")

I could be more detailed if you share a sample of your logs and (if you already have) a search that you're using?

Ciao.

Giuseppe

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...