none
Help with an AzureMetrics alert?

    Question

  • I'm just getting into writing my own AzureMetrics alerts, and I used code from MSDN for the actual alert but I don't understand the effect of period and frequency, especially relevant to "timeGenerated". Additionally, having it render a chart is super but it doesn't give the database name anywhere, so argh! How do I get the database name in there, or do I seriously have to create an alert for every database?

    Can someone explain what this alert would do?


    SQL Server DBA

    Wednesday, January 9, 2019 9:15 PM

All replies

  • I'm just getting into writing my own AzureMetrics alerts, and I used code from MSDN for the actual alert but I don't understand the effect of period and frequency, especially relevant to "timeGenerated". Additionally, having it render a chart is super but it doesn't give the database name anywhere, so argh! How do I get the database name in there, or do I seriously have to create an alert for every database?

    Can someone explain what this alert would do?


    SQL Server DBA

    Good day,

    >> I used code from MSDN for the actual alert

    Where is the code/link?
    Unfortunately, most people in the forum cannot read minds :-)
    In any question, you should think about the fact that we have no option to see what you do but only to read what you say hat you do.

    >> I don't understand the effect of period and frequency, especially...

    In the following Doc you have some explanation for each of the metric alerts parameters

    How do metric alerts work

    >> Additionally, having it render a chart is super but it doesn't give the database name anywhere, so argh!

    This is a feedback which you can send top the team using the feedback system. It is not exactly a question I can response :-)
    You can use the "Diagnostics and Monitoring" feedback system here:
    https://feedback.azure.com/forums/231545-diagnostics-and-monitoring

    >> do I seriously have to create an alert for every database?

    If you are using Azure SQL Database, then by definition you are using a Database level service. With that being said, you can monitor some actions in the (logical) instance, and you can select the master database for some monitoring when it fit you.

    Have a great day :-)


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Wednesday, January 9, 2019 11:34 PM
    Moderator
  • thank you - I posted an image of it, with the code, it must not have shown up.

    SQL Server DBA

    Thursday, January 10, 2019 9:40 PM
  • thank you - I posted an image of it, with the code, it must not have shown up.

    SQL Server DBA

    Hi,

    I can see the image which you added in the original message,and it helped me a lot to understand what you did, but you mentioned code from MSDN, and code usually comes with some tutorial and more then one command. I did not relized that this is all the code you use and still a link to the source could give us more insights maybe :-)

    Did you got all the answers from my message above, or is anything still open?


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Friday, January 11, 2019 5:28 AM
    Moderator
  • Hi rottengeek,

    The alert is looking for the following condition: If there is at least 1 occurrence of the Max DTU usage % at 90% for 5 minutes within a 5 min time window. In this case the time window is between 12:15:09 and 12:20:09 on the 8th of January. 

    ~Mike

    Friday, January 11, 2019 7:27 PM
    Moderator
  • Hi rottengeek,

    Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same. And, if you have any further query do let us know.

    Thursday, January 31, 2019 4:47 AM
    Moderator