Forum Discussion
sunnypatel
Mar 09, 2019Copper Contributor
Standard Deviation in AppInsights query
I want to be able to get alerted from AppInsights whenever the number of errors in 15min time "buckets" exceeds 2 standard deviations from the norm. Here is an example of what I've tried thus far: ...
Ketan Ghelani
Mar 11, 2019Former Employee
The query seems to be fine. You just have an extra blank link after completion of your let statement.
let x =
toscalar(customEvents
| where name contains "Vendor"
| where customDimensions.OperationResult != "Success"
| summarize RequestCount=count() by OperationResult=tostring(customDimensions.OperationResult), bin(timestamp, 15min)
| summarize stdev(RequestCount));
customEvents
| where name contains "Vendor"
| where customDimensions.OperationResult != "Success"
| summarize RequestCount=count() by OperationResult=tostring(customDimensions.OperationResult), bin(timestamp, 15min)
| where RequestCount >= (x * 2)