Splunk Search

Need to lookup index volume by sourcetype for past year

balbano
Contributor

Hey guys,

Got another one for ya:

I need to lookup sourcetypes for the past year.

I basically need to know how to run a search similar to the "Index Volume" report on the GUI.

Currently, if I run the Index Volume report for the past year it will take forever and my WebGUI session will die. I want to see if there is anyway to run this query and then export it to CSV somehow.

I have seen the other question posts and the index volume troubleshooting page but I'd like to tailor those queries to go back for the past year in relative time (-12m) and then export to CSV.

Any help you can provide would be great.

If you need any clarification on anything let me know.

Thanks.

Brian

Tags (2)
0 Karma
1 Solution

lguinn2
Legend

Try this

index=_internal source=*metrics.log group=per_sourcetype_thruput | eval MB=round(kb/1024,3) | 
stats sum(MB) as IndexedMB by series | rename series as sourcetype | outputcsv IndexBySourcetype

I don't know how it will perform over a year's worth of data, though.

View solution in original post

0 Karma

lguinn2
Legend

Try this

index=_internal source=*metrics.log group=per_sourcetype_thruput | eval MB=round(kb/1024,3) | 
stats sum(MB) as IndexedMB by series | rename series as sourcetype | outputcsv IndexBySourcetype

I don't know how it will perform over a year's worth of data, though.

0 Karma

balbano
Contributor

I decided to just schedule this search to run in the background and email me the results. That should work!!!

0 Karma

balbano
Contributor

Thanks Iguinn, I will give it a shot, is there a way to run this in the background, perhaps on CLI (which I know nothing about?) My concern is that my web session may expire in the process of running this query. If you know anything that might be able to solve that issue, that would be great. Let me know. Thanks. -Brian

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...