Splunk Search

Avoid streamstats truncate to obtain previous value

DanielSp
Explorer

I have a index with the follow data:

KEY_ID, GROUP, DATE

With for example:
1, group1, 2021-06-01
1, group2, 2021-06-02
2, group1, 2021-06-01

...

I want to obtain next date value to show a table like:
1, group1, 2021-06-01,2021-06-02
1, group2, 2021-06-02,NULL

...

I know that I can sort It and use a command like streamstats:

| streamstats current=f last(DATE) as DATENEXT by KEY_ID

But, my issue is that my index have a million of records, so, the results are truncated to 10.000

Is there any way to obtain the DATENEXT without modify limits.conf for streamstats?

Thanks a lot¡

Regards

Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Does window=1 help?

| streamstats window=1 current=f last(DATE) as DATENEXT by KEY_ID

View solution in original post

DanielSp
Explorer

Thanks a lot¡

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Does window=1 help?

| streamstats window=1 current=f last(DATE) as DATENEXT by KEY_ID
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...