httpvisualizationazure-monitoringhealth-checkazure-monitor-workbooks

How can HTTP queries be run in the Azure Monitor workbooks?


How can HTTP queries be run in the Azure Monitor workbooks?

I read all the documentation here and still can not find how could I use my application health checks http endpoints to report on my application status in an Azure Monitor woorkbook.

I have an ASP.NET application if it matters. It exposes endpoints which I would like to call from the workbook and do different visualizations depending on the data returned.


Solution

  • You'd use the "Custom Endpoint" data source in the Query step.

    https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-data-sources#custom-endpoint

    custom endpoint datasource

    The endpoint needs to support CORS, because the calls would be coming from the azure portal, and also needs to support https, because the portal itself is loaded via https.

    The endpoint is also expected to return JSON content, and then you can use JSONPath inside the settings of the custom endpoint's Result Settings tab to transform it into grid data.