All Apps and Add-ons

SPLUNK enterprise i am trying to calculate results where > 4% of failure  is my formula correct , to set anomaly ?

maulik29
Engager

i am trying to calculate results where > 4% of failure  is my formula correct , to set anomaly ? 

| inputlookup  sample.csv | eval isananomaly = if('Failcount' / 'Totalcount' * 100 > 4 ,  1 , 0)

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Because of integer arithmetic, I prefer to use 

| inputlookup  sample.csv | eval isananomaly = if((Failcount * 100 / Totalcount) > 4 ,  1 , 0)
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Because of integer arithmetic, I prefer to use 

| inputlookup  sample.csv | eval isananomaly = if((Failcount * 100 / Totalcount) > 4 ,  1 , 0)
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...

Explore the Latest Educational Offerings from Splunk [January 2025 Updates]

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...