How to create an alert rule for Azure Functions runtime is unreachable

John van Zalk 20 Reputation points

I recently expirienced a runtime ureachable error for one of my Azure Functions. I only discovered it when I was working in the Azure portal. I want to set up an email alert so I get notified if this error occurs in the future. Is there a custom log search or signal that I could use to capture this error?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,718 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde 25,501 Reputation points MVP

    Hello @John van Zalk,

    welcome to this moderated Azure community forum.

    Are you using Application Insights in combination with your Azure Functions?

    If your functions work with HTTP triggers, you are in luck. Application Insights offers a number of availability tests.

    This goes from the original URL pings to more elaborate 'standard tests':

    This single request test is similar to the URL ping test. It includes TLS/SSL certificate validity, proactive lifetime check, HTTP request verb (for example, GET, HEAD, or POST), custom headers, and custom data associated with your HTTP request.

    Application Insights works in combination with an Azure Log Analytics Workspace (Azure monitor).

    This service also offers Alert rules.

    This way, you can add even more elaborate tests.

    Please check out these different ways to monitor the health of your Azure Functions.

    This answer is written by myself, not by some AI. If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

  2. MayankBargali-MSFT 63,841 Reputation points

    @John van Zalk Thanks for reaching out. You can use the log query alert for your function resource if you have configured the application insights. For more details you can refer to this document.

    To analyze the telemetry data for azure function you can refer to this document and build the query as per your need.

    Let me know if you have any queries or concerns.