Getting Data In

How to sort the contents of a list by timestamp

whydoineedtoreg
New Member

I'm currently querying

source="log" | stats list by Id

Which gives me nicely grouped data.

However I would like the content of those groups sorted by Timestamp.
That is to say I do not want the groups themselves sorted but the records inside each group.

0 Karma
1 Solution

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id

View solution in original post

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...