How to check the health of the Azure Log Analytics REST API

335 Views Asked by At

I have an application that uses Azure Log Analytics REST API to query logs data from Azure log analytics workspace. I want to implement a public health check endpoint for that application. That health check ideally should assess the connection to the Log Analytics REST API and confirm the status of it. So is there a public health check endpoint available for Azure Log Analytics REST API? If not how can I achieve the above requirement?

1

There are 1 best solutions below

2
On BEST ANSWER

If you want to check the status of the REST API, just take use of this api with any program language. For example, there is always a table named AzureActivity, you can use this api to query this table, if the response is returned with 200 status code, then it means this api or Log Analytics workspace is available.

Note: Please replace the DEMO_WORKSPACE and DEMO_KEY with the real one.

Here is the screenshot about how to use this api, you can use it with any program language:

enter image description here