Azure SQL metric – Alert rule not working as expected


This Content is from Stack Overflow. Question asked by nam

Question: Based on the following storage space statistics of my Azure SQL Managed Instance, a) what does the Storage space used (avg) 51.76k (shown at the bottom of the image1 below) represent b) the value 51.76k relates to which value in the stats table below?

Why the Question: I am asking it because whenever I create an alert with a condition: When space use is greater than x, then even if I set the value of x to be 52, 55, or even 50510, the alert gets triggered and sends me an email. But I am not making any changes in the databases in my Azure SQL managed instance. And, I can see that my stats query is still returning the same values (shown in image below), and the matric view (shown in image 1 below) is also not changing. So, why the alert gets triggered 5 minutes after I create it. This happened all three times when I created an alert for threshold of 52,55, and 50510 respectively. There must be something I am not doing right because I thought the alert will only get triggered if the threshold exceeds, say, 50510.
Now, in my Azure SQL Managed Instance, SSMS is showing the my data statistics as follows:

|volume_mount_point| used_gb | available_gb  | total_gb |
|        c:       |   0.2   |    191.8      |  192.0   |
|       http://    |   50.5  |     33.5      |  384.0   |

And the Metric view is as follows:

enter image description here


I am following this tutorial from MS Azure team describes how to creates an Alert Rule to send an alert by using following values (also shown in image 1 below):

Metric: Storage Space used
Condition: When Space used is greater than 1840876 MB

Now item 7 of this section of the article states: value of 1840876 MB is used representing a threshold value of 1.8 TB. And then a value 1.84M is shown in the bottom section of the image 1.

enter image description here


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?