Getting Data In

Daily index volume by sourcetype

mtanadsk
Explorer

How does one go about calculating daily index volume by sourcetype?

I'm currently capturing all logged data and sending it to the main index, but moving away from that method, for performance/scalability reasons. We're going through a data classification exercise that will dictate our future state indexes, and as part of that exercise, want to get a better idea of the breakdown of data sizes, and thought sizing by 'sourcetype' would be a good starting point.

thanks for any information!

Regards,
-m

slierninja
Communicator

This works with Splunk 6.2 for supporting GB by index...

index=_internal source=*metrics.log | eval GB=kb/(1024*1024) | search group="per_sourcetype_thruput" | timechart span=1d sum(GB) by series limit=20

landen99
Motivator

I downvoted this post because the results from this solution are incomplete. only the top 10 sourcetypes are recorded in metrics

0 Karma

wyfwa4
Communicator

By default the metrics will only provide details on the top 10 items in a series - this applies to almost all the metrics that are collected.

https://docs.splunk.com/Documentation/Splunk/8.1.3/Troubleshooting/Aboutmetricslog

The way to address this, is to change the limit applied using the limits.conf file - the following stanza added to a indexer / HF will increase the number of items which are tracked

[metrics]
maxseries = 50
interval = 60

This will ensure the top 50 items are included - so you can adjust this to reflect the likely number of sourcetypes if that is the main metric to be tracked

The "interval" reference allows you to change the frequency that this data is collected to control the volume of data generated in the log. In the same, the frequency is 60seconds to allow minute by minute tracking - but that may be excessive for some purposes.

0 Karma

kiran_mh
Explorer

How can I get the index volume for a particular sourcetype, for example sourcetype=perfmon*..?

0 Karma

ss026381
Communicator

Try this query, it will give you size in GB for each day.

index=_internal source=*metrics.log
series=wineventlog:security
| eval formatted_time=strftime(_time, "%x")
| Rename series as sourcetypes
| chart sum(kb) over sourcetypes by formatted_time
| sort - [ makeresults | addinfo | eval time="\"".strftime(info_max_time-1, "%x")."\"" | return $time]
| foreach */* [eval "<<FIELD>>"=round('<<FIELD>>'/1024/1024,2)." GB"]
0 Karma

rakesh44
Communicator

If i have 3 source type like type, item and payable then what would be command. Can you please give command for my sourctetype.Thanks

0 Karma

rashid47010
Communicator

I am new to splunk
I installed trial version which can index 500 MB/day. My question is that Domain controller can index how much events. Please just give me estimate.

0 Karma

wbfoxii
Communicator

In the Search app, hit the "status" dropdown and choose index activity. I was able to get index volume by sourcetype / server / at any time span. It was great for a built-in tool.

Running Splunk 4.3.2

0 Karma

cnk
Path Finder

index=_internal source=metrics.log splunk_server="" | eval MB=kb/1024 | search group="per_sourcetype_thruput" | timechart span=1d sum(MB) by series

landen99
Motivator

I downvoted this post because incomplete. only top 10 sourcetypes recorded in metrics

0 Karma

gurinderbhatti
Path Finder

What if i want to know for a specific sourcetype in a specific index?
We have over 50+ indexes but for a couple of indexes, lets say index=a, index=b, index=c, i want to know how much data on a daily basis, my windows system/security/events logs are generating (min,max,avg) for a 30 day range.
Can someone write up a quick search for this? Much appreciated.

ss026381
Communicator

Try below, select the time last 30 days in time picker.

 index=_internal source=*metrics.log group="per_sourcetype_thruput"
 [| metadata type=hosts ( index=a OR index=b OR index=c)| table host | format] 
 (series=wineventlog:system OR series=wineventlog:security OR series=wineventlog:application) 
 | eval formatted_time=strftime(_indextime, "%x")
 | Rename series as sourcetypes
 | chart sum(kb) over sourcetypes by formatted_time
 | sort - [ makeresults | addinfo | eval time="\"".strftime(info_max_time-1, "%x")."\"" | return $time]
 | foreach */* [eval "<<FIELD>>"=round('<<FIELD>>'/1024/1024,2)." GB"]
Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

&#x1f342; Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...

Transform your security operations with Splunk Enterprise Security

Hi Splunk Community, Splunk Platform has set a great foundation for your security operations. With the ...

Splunk Admins and App Developers | Earn a $35 gift card!

Splunk, in collaboration with ESG (Enterprise Strategy Group) by TechTarget, is excited to announce a ...