Splunk Search

Give me a count of all events but give me the date of the last event?

the_wolverine
Champion

I'm generating a table of event count (same events) but I want it to also return the timestamp of the last event. I can't figure out how to do it. Running stats count against timestamp will give me a single count for each timestamp.

timestamp,color,shape,count
?,blue,square,5
?,red,circle,15
?,yellow,triangle,12

Help?

0 Karma
1 Solution

Ayn
Legend
... | stats count, latest(_time)

?

View solution in original post

Ayn
Legend
... | stats count, latest(_time)

?

the_wolverine
Champion

Thank you, Ayn!!!!!

0 Karma

Ayn
Legend

Well then, stats count, latest(_time) by color,shape

the_wolverine
Champion

I think I oversimplified my example. I have a few fields in there so there are a couple of eventtypes, actually.

0 Karma
Get Updates on the Splunk Community!

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...

Thank You for Celebrating CX Day with Splunk!

Yesterday the entire team at Splunk + Cisco joined the global celebration of CX Day - celebrating our ...