All Apps and Add-ons

I have been trying to get the GB used over 30 days per index, but it keeps coming back with only the first 10. I need it for all indexes, what do I need to do to get that to happen?

nls7010
Path Finder

index=_internal source=*license_usage.log type=Usage | eval GB = b/1024/1024/1024 | timechart span=30d useother=0 sum(GB) by idx | rename idx as Index, sum(GB) as GIGbyte | sort – GIGbyte
That is the search I have going, not certain why it's only bringing back the first 10 indexes only.

0 Karma
1 Solution

kmaron
Motivator

Just add limit=0 to your timechart

index=_internal source=*license_usage.log type=Usage 
| eval GB = b/1024/1024/1024 
| timechart span=30d useother=0 sum(GB) by idx limit=0
| rename idx as Index, sum(GB) as GIGbyte 
| sort – GIGbyte

View solution in original post

0 Karma

kmaron
Motivator

Just add limit=0 to your timechart

index=_internal source=*license_usage.log type=Usage 
| eval GB = b/1024/1024/1024 
| timechart span=30d useother=0 sum(GB) by idx limit=0
| rename idx as Index, sum(GB) as GIGbyte 
| sort – GIGbyte
0 Karma

nls7010
Path Finder

That worked perfectly, thank you

0 Karma

Rob2520
Communicator

Try this query

index=_internal source=*license_usage.log type=Usage earliest=-30d@d latest=@d
| stats sum(b) AS Bytes by idx
| eval GB = round(Bytes/1024/1024/1024,2)
| rename idx as index
| table index GB
| sort -GB

For additional statistics on average and max license usage check my other post
https://answers.splunk.com/answers/694793/can-you-help-me-improve-this-alert-for-indexes-tha.html#an...

cheers!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...