Splunk Search

How to search for total number of buckets for an index and total sizeOnDiskMB for a specific state?

jcspigler2010
Path Finder

Hello,

I am looking for a go-to search that will give me total number of buckets for an index for a specific state of a bucket and the total sizeOnDiskMB for this state. What would also be nice is if this could be at the bottom of a table for the index so I can see the location that all these buckets are stored. I can get the total of sizeOnDiskMB, but can't seem to add in the the total number of buckets as a row.

This is my current search

|dbinspect index=main state =warm splunk_server=*idx02* | eval size=sizeOnDiskMB/1024| addcoltotals | fillnull value="Total" | table index,path,size

any and all help would be great

0 Karma

somesoni2
Revered Legend

You need to use an appendpipe command, instead of addcoltotal which only does sum and only for numeric valued columns.

Give this a try

|dbinspect index=main state =warm splunk_server=*idx02* | eval size=sizeOnDiskMB/1024 | table index,path,size | appendpipe [| stats count(path) as path sum(size) as size | eval index="Total"]
0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

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