Getting Data In

len(_raw) vs |dbinspect rawSize

Hoekb03
Explorer

I use a simple query to determine the amount of data I've sent to splunk:

index=x
|eval esize=len(_raw)
|timechart sum(esize) span=1h

This is pretty expensive when ran over long timeranges. I also tried this:

|dbinspect index=x
|eval date=strftime(startEpoch,"%F")
|chart sum(rawSize) over date
|rename sum(*) -> *

The results are different, dbinspect reporting lower values than len(_raw).

Any ideas on a cheap way to get the right results?

0 Karma

FrankVl
Ultra Champion

I usually get that sort of info from the license usage events in _internal.

Eg:

index="_internal" source="*license_usage.log" type=Usage 
| bin _time span=1d 
| stats sum(b) AS bytes by _time,idx 
| eval DailyGB=bytes/1024/1024/1024 
| timechart sum(DailyGB) by idx span=1d
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

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, ...