0
votes

I have recently started working with Windows Azure and have read that they have an option of setting up alerts. I tried to set up an alert and found that there was an option called period which is defined as "Time span during which to monitor the metric data specified by the alert rule". This definition is somewhat unclear to me.

For continuous metric like CPU : If I select the period to be '5 min', does that mean that Azure will monitor the metric for 5 minutes and if the metric is above the threshold for the entire 5 min, only then the alert will be raised. Or does it mean that Azure will monitor the metric in a 5 min window and if the metric goes above the threshold in that window, the alert will be raised.

For discrete metrics like Server Exceptions : For metrics like Server Exceptions which are discrete in nature, if I set the period to be 5 min, does it mean that the metric is summed and in any 5 min window if the sum reaches above the threshold then the alert will be raised.

Can anyone please elaborate on my above understanding and confirm if I am correct/wrong?

2

2 Answers

3
votes

The period that you choose specifies the interval over which metrics are aggregated. It doesn't affect how often the alert is evaluated: that depends on the frequency of arrival of metrics.

So for continuous metrics in your example, the evaluation will aggregate the metric over the preceding period(if you specify 5 min, it will aggregates the metric over last 5 min) and then compares the average value to the threshold to determine the new state of the alert. And for discrete metrics, it will sum the values and compare the total with the threhold.

For more information, please refer to this.

1
votes

In case of the continuous metric - like CPU, it takes the average value over your timespan. So if you set the threshold at 40% and the period to 5 minutes, the alert will fire if the average CPU load is over 40% in the 5 minute window.

For the discrete metrics, it's indeed about totals. So if you set the threshold to 5 and period to 5 minutes, the alert will fire you have get over 5 occurrences within the window.

To get more insight into these alert rules - checking out the PowerShell interface for them: https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/02/26/retrieving-resource-metrics-and-creating-alert-rules-via-azure-powershell/ and https://msdn.microsoft.com/en-us/library/mt282468.aspx