Splunk Search

Why does _time bucket give different results depending on how the data is sorted?

manus
Communicator

The following search returns two values (yesterday (1430780400) and today(1430866800)):
earliest=-d@d index=_internal
| bucket _time span=1d
| stats values(_time)

This search returns only one value (yesterday(1430780400)):
earliest=-d@d index=_internal
| sort _time
| bucket _time span=1d
| stats values(_time)

So sorting by _time affects the results of "bucket _time span=1d".
That looks like an undesired feature to me.

Tags (3)
0 Karma
1 Solution

HeinzWaescher
Motivator

How many events are searched for? I think the sort command you are using only uses 10k events.

Try this

 | sort 0 _time

View solution in original post

HeinzWaescher
Motivator

How many events are searched for? I think the sort command you are using only uses 10k events.

Try this

 | sort 0 _time

manus
Communicator

Thanks a lot, spot on. That was the problem. It's the second time I forget sort is constrained by default.

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...