Are you looking for this:
Alert:
| rest splunk_server=### /services/data/indexes datatype=all
| join title type=outer
[| rest splunk_server=### /services/data/indexes-extended datatype=all
| fields title, total_bucket_count]
| `dmc_exclude_indexes`
| fields title maxTotalDataSizeMB currentDBSizeMB
| eval currentDBSizeGB = if(isnotnull(currentDBSizeMB), round(currentDBSizeMB / 1024, 2), 0)
| eval maxTotalDataSizeGB = if((maxTotalDataSizeMB == 0) OR isnull(maxTotalDataSizeMB), "unlimited", round(maxTotalDataSizeMB / 1024, 2))
| eval percused = round((currentDBSizeMB / maxTotalDataSizeMB) *100,2)
| fields - maxTotalDataSizeMB currentDBSizeMB
Result:
title currentDBSizeGB maxTotalDataSizeGB percused
_audit 15.89 488.28 3.25
_internal 487.35 488.28 99.81
_introspection 3.53 488.28 0.72
If percused > threshold, then trigger alert...
Note:
Replace ### with your hostname.
... View more