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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...