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

John van Zalk 100 Reputation points
2023-11-06T20:03:48.9866667+00:00

I recently experienced a runtime unreachable error with one of my Azure Functions and I only discovered it when I was in the Azure portal. I want to set up an email alert so I get notified if this happens in the future. Is there a custom log search or another signal I could use to capture this error?

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

Answer accepted by question author
  1. navba-MSFT 27,605 Reputation points Microsoft Employee Moderator
    2023-11-07T06:06:01.7366667+00:00

    @John van Zalk Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that you need assistance on the error Azure Functions runtime unreachable errorbelow issue:

    • Is there a custom log search or another signal I could use to capture this error?
    • How to create an alert rule for Azure Functions runtime is unreachable

    Is there a custom log search or another signal I could use to capture this error?
    This issue occurs when the Functions runtime can't start. The most common reason for this is that the function app has lost access to its storage account.
    Action Plan:
    1.Please ensure that the Storage account requirements are met.
    2.Follow the troubleshooting steps highlighted here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-recover-storage-account
    3.Please check the Function App detectors by navigating to the Diagnose and Solve Problems section in the Azure Portal for the Functions as shown below: You can rely on the Function App Down or Reporting Errors setting:
    User's image

    4**.Check the Azure Function App's logs to get more information about the error. You can do this by navigating to the Azure portal, selecting the Function App, and then selecting "Logs" from the left-hand menu. Look for any error messages or exceptions that could be causing the issue.
    More info about enabling and querying the logs are explained here.

    How to create an alert rule for Azure Functions runtime is unreachable**
    To monitor function executions, Azure Functions offers built-in integration with Azure Application Insights.
    Firstly enable the APPinsights for your Function APP. Then you can set up an email alert for your Azure Functions using App Insights. Here are the steps:

    • Navigate to your App Insights instance.
    • Go to Alerts.
    • Click “New alert rule”.
    • Click “Add” under CONDITION.
    • Choose “Custom log search”.

    More info and steps to be followed is explained here.

    This will allow you to create an alert based on a query, which can send you an email or SMS, and even invoke another function when your Azure Function fails.

    Hope this helps.

    If you have any follow-up questions, please let me know. I would be happy to help.

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.