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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...