azure custom log alert never triggered

Copper Contributor

Hi all,

I'm trying to setup a new alert in Azure Log Analytics in order to detect the increase of the failed request percentage in Azure Log Analytics.

This is my custom log search:

 

let timeGrain=30m;
let dataset=requests
| where client_Type != "Browser"
dataset
| summarize
// calculate failed request count for all requests
AggregatedValue=round((sumif(itemCount, success == false))*1000.0/(sum(itemCount))*1.0,4) by bin(timestamp, timeGrain)
// round specifies how many decimals we want, 100.0 and 1.0 forces the value to be a float

 

If I visualize the result, I'm getting the trend regarding the failure percentage. I've used the same query to trigger an alert with the following settings:

- Metric measurement greater than 0

- consecutive breaches greater than 1

- Period (grain): over the last 30 minutes

- Frequency: every 5 mins

 

The problem is, the alert is never triggered even though the percentage of failed requests is always greater than 0. Why is that happening?


Thanks,


Marco

1 Reply

Hi There,

 

Could you please check with this way,

 

- Number of results greater than 0

- Period (grain): over the last 30 minutes

- Frequency: every 5 mins

 

What this is doing here, It will run query after every 5 minute to check last 30 minutes data. So if you will use "- consecutive breaches greater than 1" then this means if there are no consecutive fails in last 30 minutes data then alert would be triggered.

 

Hope this helps, just my two cents on it :)