Splunk Search

How to calculate the size of the source type?

lamnguyentt1
Explorer

Dear professional,

I run my search string bellow

index="hcg_oapi_prod" source="/var/log/app/rest.log"

 And this is my result that is illustrated in the figure.

I have about 13 source types, ex: "oapi:atl-customer:rest", etc.

lamnguyentt1_0-1645436722091.png

Please help me to get the size of each source type. I can only get the size of index like this

lamnguyentt1_1-1645436881104.png

Thank you.

 

 

Labels (2)
0 Karma

tshah-splunk
Splunk Employee
Splunk Employee

Hey @lamnguyentt1,

Found the same question while exploring community answers and here's your solution - https://community.splunk.com/t5/Getting-Data-In/How-do-you-calculate-the-size-of-indexed-data-as-per... 

index=_internal source=*license_usage.log*  type=Usage idx=<yourindexname> | eval GB=b/1024/1024/1024 | stats sum(GB) by st
---
If you find the answer helpful, an upvote/karma is appreciated
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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