Alerting

Need to setup an alert based on field value percent variation

Jiten009
Explorer

Hi,

I need to setup the alert based on a field's(totalCount) value percent variation. My log looks like :

endPoint=search,host=158.94.64.138,remoteAdress=177.209.125.100,query="5155",status="Success",totalCount=1800,QTime=37,PTime=33,Bmode=NORMAL

i.e. trigger an alert if totalCount value varies more than 10%.

Thanks in advance for any help.

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Something like this?

... | stats max(totalCount) as max min(totalCount) as min | eval variation = min/max | where variation < 0.9

Alert whenever this yields a result... untested. Whether it's what you want depends on how you define "value varies more than 10%". I've assumed "if min value is lower than 90% of max value".

View solution in original post

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Something like this?

... | stats max(totalCount) as max min(totalCount) as min | eval variation = min/max | where variation < 0.9

Alert whenever this yields a result... untested. Whether it's what you want depends on how you define "value varies more than 10%". I've assumed "if min value is lower than 90% of max value".

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...