Issue with Azure Function Alert Email Notification

Abdullah Shahid 0 Reputation points
2024-12-18T09:29:25.3+00:00

Hi ,

I have set up an alert on a timer-triggered Azure Function to notify me via email when the function fails. Here’s what I’ve configured:

  1. Alert Rule: Triggers when the Function fails more than twice in an hour.
  2. Action Group: Configured to send an email notification to a specified email address.
  3. Test Email: When I test the action group, I successfully receive the test email.

However, when the actual alert condition is met (e.g., the function fails), I do not receive any email notifications. It seems the action is not being triggered properly during real alerts.

Could you please assist me in identifying what might be causing this issue? Here are a few additional details for your reference:

  • The alert rule and action group are in the same region.
  • The Function App is actively running, and the failures are being logged.
  • I have confirmed that the alert condition is being met as per the log analytics.
Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pranay Reddy Madireddy 6,180 Reputation points Microsoft External Staff Moderator
    2024-12-19T23:23:49.36+00:00

    Hi Abdullah Shahid

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    Check that the action group for your alert rule is set up correctly. Since you're getting test emails, make sure the action group is linked to the right alert rule and hasn't been changed or turned off by mistake.

    Check that your Azure account has the required permissions to trigger alerts and send notifications. If you're using a service principal or managed identity, make sure it has the correct roles assigned.

    Since the alert condition is met in Log Analytics, make sure the query correctly matches your function's failure. You can run the query in Log Analytics to check if it gives the right results.

    Check the health of your Azure Function App. If the function isn't running or is having issues, it may stop the alert from triggering.

    Sometimes, triggers may not register correctly after changes or deployments. Resyncing them can make sure they are properly registered with Azure. You can do this using PowerShell or Azure CLI.

    If you have any further queries, do let us know.


    If the answer is helpful, please click "Upvote it".

    0 comments No comments

Your answer

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