I am trying to build an ALERT for a condition where in a timespan of 15mins if the number of FailedRequests were Greater than 99% of the requests received I want to raise the Alert. I have written a KQL Query but unfortunately it just fires of even without real issues happening i.e. without really getting the condition of greater than 99%. following is the query and I am sure I am making some silly mistake in it any help?
Any help in fixing above query so it really gives results only when it is crictical i.e. when all of the requests received are failing.
requests
| where cloud_RoleName == 'ABCDEF_cloudRName' and resultCode != '404'
| summarize FailedPercent=((countif(success == false))/count() by timestamp, cloud_RoleName, appName)*100
| where FailedPercent > 99
| project RelatedCI='XYZZZ',AlarmTime=timestamp,Category="Cloud-Azure-Monitor",SubCategory="Application",Object=appName ,"Value of Metric","Percentage Failed Requests"," is ", FailedPercent