Alerting

how to setup a triggered alert on a index based on usage?

user543210
New Member

Hello, I would like to setup ongoing alert to be triggered anytime an index ingests 20gb of logs. This is to prevent a license violation due to developers turning on debug mode and leave it one resulting in a lot of unnecessary logs after the issue is resolved. Thank you!

0 Karma

somesoni2
SplunkTrust
SplunkTrust

You can use Splunk's license usage log to do so.
This will check current day's usage till current time. You'll receive an alert soon after index's today's usage is over 20GB. You can run this search every hour OR every 15 minutes, depending upon how quickly you want to get reported.
For a specific index-

index=_internal sourcetype=splunkd component=LicenseUsage idx="yourIndexName" earliest=@d
| stats sum(b) as Usage | eval Usage=round(Usage/1024/1024/1024,2) | where Usage>20

Generic for any index using (will give list of all indexes whose total license usage for day is over 20GB.

index=_internal sourcetype=splunkd component=LicenseUsage earliest=@d
| stats sum(b) as Usage by idx | eval Usage=round(Usage/1024/1024/1024,2) | where Usage>20
0 Karma
Get Updates on the Splunk Community!

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

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

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