Splunk Search

presenting logs in reverse order

a212830
Champion

hI,

The default mode for Splunk is to show the most recent activity first. How can I show the logs from, say midnight to now, rather than now to midnight.

Tags (2)
1 Solution

somesoni2
SplunkTrust
SplunkTrust

There is no setting to changes the Splunk's default chronological order of showing events (most recent to oldest). You can use "reverse" command to show events in opposite order.

See this
http://answers.splunk.com/answers/1691/how-to-reverse-the-order-of-displayed-events

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

There is no setting to changes the Splunk's default chronological order of showing events (most recent to oldest). You can use "reverse" command to show events in opposite order.

See this
http://answers.splunk.com/answers/1691/how-to-reverse-the-order-of-displayed-events

somesoni2
SplunkTrust
SplunkTrust

The only problem with sort is that it doesn't handle events with same timestamp well like reverse does. Otherwise if there won't be events with same timestamp or you don't care about the order in that case, sort _time can be used.

agodoy
Communicator

I have found that the reverse command gives unexpected results, specially when there are a lot of events returned. Therefore, I use the sort command on the _time field.

<your search> | sort +_time
0 Karma

Jeff_Lightly_Sp
Communicator

Using REVERSE may do the job for you:

| reverse

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...