Log query for specific failed URL test Azure

Simran Kaur Deol 41 Reputation points
2022-05-09T11:30:19.933+00:00

Hi everyone,

I'm relatively new to Azure and currently working on custom Availability functions for multi-URL ping test.

I've applied alerts in case a URL fails but in the mail it doesn't mention which URL's test has failed.

I tried log query but couldn't land up anywhere. The max I get is as follows -

200311-image.png

Please let me know if there's a way to do it.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,800 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,875 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 25,666 Reputation points Microsoft Employee
    2022-05-13T20:01:51.897+00:00

    Hi @Simran Kaur Deol ,

    Apologies for the delayed response. I'm assuming you created an URL ping test by following this doc, if not please comment let me know how you created the test. I think the query you're looking for is

       availabilityResults  
       | where timestamp > ago(2d)  
       // see results for a specific test  
       // | name == "<availability test name>"  
       | extend durationInSeconds = duration / 1000  
       // limit samples to work with 'render scatterchart'  
       | take 5000  
       | summarize avg(durationInSeconds) by name, timestamp  
       | render scatterchart with (ycolumns=avg_durationInSeconds, xcolumn=timestamp)  
    

    The availability test is tied to a single URL, so you can add additional tests and this query will show you the test name in the results. So, the email that is sent should contain the actual name of the availability test in which the URL is implied. You could rename the availability test so that it contains an identifier of the URL to make it easier distinguishable.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful