Splunk Search

max index size value

EricPartington
Communicator

How do I search for and return the max index size as defined by the indexes.conf file?

I want to get the same value that you can see from the Manager > indexes page (Max size (MB) of entire index )

metadata or dbinspect?

Tags (2)
0 Karma
1 Solution

cgilbert_splunk
Splunk Employee
Splunk Employee

Okay, I'll give it a shot...I didn't see any way of doing this with either metadata or dbinspect...but here's what I did:

1) I splunked Splunk...basically, I started monitoring my /splunk/etc directory and ingesting all my splunk config files
2) I determined that the parameter I was looking for in the indexes.conf file is: maxTotalDataSizeMB
3) I defined a field extraction to extract the "header" of each section of a splunk conf file...my regex is: (?im)^(?P

[.+]$) ...this helps when I perform my search
4) The search I used after doing all this was:

source="/splunk/etc/system/local/indexes.conf" | table Header maxTotalDataSizeMB | rename Header to Index

Index maxTotalDataSizeMB

[_thefishbucket] 600000

(this is what the results looked like...well, it looked better in Splunk, but hopefully you get the picture)...by the way, this matched up exactly to what I saw in manager.

Not at all sure if this solves your problem the way you wanted it solved, but I had fun trying to figure it out!

View solution in original post

cgilbert_splunk
Splunk Employee
Splunk Employee

Okay, I'll give it a shot...I didn't see any way of doing this with either metadata or dbinspect...but here's what I did:

1) I splunked Splunk...basically, I started monitoring my /splunk/etc directory and ingesting all my splunk config files
2) I determined that the parameter I was looking for in the indexes.conf file is: maxTotalDataSizeMB
3) I defined a field extraction to extract the "header" of each section of a splunk conf file...my regex is: (?im)^(?P

[.+]$) ...this helps when I perform my search
4) The search I used after doing all this was:

source="/splunk/etc/system/local/indexes.conf" | table Header maxTotalDataSizeMB | rename Header to Index

Index maxTotalDataSizeMB

[_thefishbucket] 600000

(this is what the results looked like...well, it looked better in Splunk, but hopefully you get the picture)...by the way, this matched up exactly to what I saw in manager.

Not at all sure if this solves your problem the way you wanted it solved, but I had fun trying to figure it out!

EricPartington
Communicator

I'll give this a shot, although I have a distributed environment and am using deployment server so i'll be looking to injest each indexes.conf file from each app.
should be interesting to see if this works.

thanks for the suggestion.

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...