Alerting

trigger alert if license utilization by an index is increased by 50GB comparing to last day

vikas_gopal
Builder

HI Experts ,

I want to rigger an alert based on below scenario

1) Get license utilization in GB for yesterday and day before yesterday .

2) Show difference in GB and if the difference is increased by 40GB then trigger an alert

Something like below , I want to trigger alert only for line 2 that is for database

index_nameyesterdayday_before_yesterdaydiff
application20GB10GB10GB
database30GB70GB40GB
security40GB20GB20GB
Labels (1)
0 Karma
1 Solution

vikas_gopal
Builder

Well I have achieved this with below search query , hope this will help someone

Run this from LM

index=_internal sourcetype=splunkd source=*license_usage.log type=usage earliest=-2d@d latest=@d
| eval day=if(_time>relative_time(now(),"-1d@d"),"Yesterday","Day_Before_Yesterday") | chart sum(b) as usage by idx day
| eval Yesterday=round(Yesterday/1024/1024/1024,2) | eval Day_Before_Yesterday=round(Day_Before_Yesterday/1024/1024/1024,2)
| eval diff=round((Yesterday-Day_Before_Yesterday),2)|where diff>20

View solution in original post

vikas_gopal
Builder

Well I have achieved this with below search query , hope this will help someone

Run this from LM

index=_internal sourcetype=splunkd source=*license_usage.log type=usage earliest=-2d@d latest=@d
| eval day=if(_time>relative_time(now(),"-1d@d"),"Yesterday","Day_Before_Yesterday") | chart sum(b) as usage by idx day
| eval Yesterday=round(Yesterday/1024/1024/1024,2) | eval Day_Before_Yesterday=round(Day_Before_Yesterday/1024/1024/1024,2)
| eval diff=round((Yesterday-Day_Before_Yesterday),2)|where diff>20

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...