Splunk Search

sitop storing all the top information

ruisantos
Path Finder

Is there a way to limit the amount of summary events stored by sitop. I have scheduled search running every night with a sitop limit=20 (to store only the 20 top results) but the limit option does seem to work is and I'm storing up to 60.000 events. is there a way to resolve that?

Tags (2)
0 Karma
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

No, the summary index accelerators will store everything, since their contract is to provide accurate answers, even when combined with other time periods. If they truncated their results, then if some truncated value were dominant in another time period, its count would be incorrect.

If you know that your distribution is relatively consistent and you don't need percentage calculation, you could just use stats:

... | stats count by f | sort - count | head 20

If you do need the total count, it's a bit trickier, but still possible:

... | stats count by f | sort - count | streamstats count as serial | eval f = if(serial > 20, "OTHER", f) | stats count by f

View solution in original post

0 Karma

Stephen_Sorkin
Splunk Employee
Splunk Employee

No, the summary index accelerators will store everything, since their contract is to provide accurate answers, even when combined with other time periods. If they truncated their results, then if some truncated value were dominant in another time period, its count would be incorrect.

If you know that your distribution is relatively consistent and you don't need percentage calculation, you could just use stats:

... | stats count by f | sort - count | head 20

If you do need the total count, it's a bit trickier, but still possible:

... | stats count by f | sort - count | streamstats count as serial | eval f = if(serial > 20, "OTHER", f) | stats count by f
0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...