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!

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