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
Revered Legend

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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...