Splunk Search

Can you help me compare how much data was ingested in GB from an index today and yesterday?

snallam123
Path Finder

I tried this,

| dbinspect index=test  | eval GB=sizeOnDiskMB/1024| addinfo span=-2d | stats sum(GB) as today 
| append
 [| dbinspect index=test  | eval GB=sizeOnDiskMB/1024 | addinfo span=-1d | stats sum(GB) as yesterday ]

I am not getting accurate results from above. Can any one suggest a query with accurate results?

Thanks.

0 Karma

somesoni2
Revered Legend

Use the license usage query (run this on your license server OR search head, if you forward license server logs to indexers searchable by search head). Use appropriate time range (e.g. earliest=-1d@d latest=now)

index=_internal sourcetype=splunkd component=LicenseUsage idx=test 
| timechart span=1d sum(b) as usage
| eval usageGB=round(usage/1024/1024/1024,2)
0 Karma

snallam123
Path Finder

@somesoni2 thanks, The query you mentioned gives license usage of index, I am looking to figure out how much data i am getting from all servers to that particular index(ex:test) and compare today's data to yesterday's data.

And can you please explain difference between

index=_internal sourcetype=splunkd component=LicenseUsage idx=test
| timechart span=1d sum(b) as usage
| eval usageGB=round(usage/1024/1024/1024,2)

And
| dbinspect index=test | eval GB=sizeOnDiskMB/1024 | stats sum(GB)

Thanks.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...