How to add alerts regards to Azure Application gateway backend health

Murali R 120 Reputation points

Hi Team, I have a doubt on adding alerts to the Azure application gateway for backend health. Whenever the backend is unhealthy, the mail to be triggered to the team mentioning the application is unhealthy. I have tried creating alerts but the mail gets triggered only once, I need it for triggering atleast once a day till the issue is resolved. Can anyone provide me a solution for the same.

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
780 questions
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshu katara 1,020 Reputation points

    Hope doing good!

    To set up alerts for Azure Application Gateway backend health that trigger multiple times until the issue is resolved, you can use Azure Monitor Alerts with a combination of Log Analytics and an action group. Here are the steps to achieve this:

    1. Create a Log Analytics Workspace:
      • If you don't already have one, create a Log Analytics Workspace in the Azure portal and if you have one you can use existing workspace

    Configure Diagnostic Settings:

    • Configure Diagnostic Settings for your Application Gateway to send health probe status data to the Log Analytics Workspace.
    • You can do this by going to your Application Gateway settings, selecting "Diagnostics settings," and then configuring the appropriate diagnostics settings to send data to the Log Analytics Workspace.

    Create a Log Analytics Query Alert:

    • In the Log Analytics Workspace, create a query that checks the health probe status. For example, you can use a query like this to detect unhealthy backend instances:
    sqlCopy code
    | where ResourceType == "APPLICATIONGATEWAYS" and Resource == "YourApplicationGatewayName"
    | where ResourceId contains "/backendhealth/"
    | where Status_s != "Healthy"
    • Save the query.

    Create an Action Group:

    • In the Azure portal, go to "Monitor" -> "Alerts" -> "Manage actions groups."
    • Create a new action group, and configure it to send email notifications to your team members.
    • Add this action group to your Application Gateway alerts.

    Create an Alert Rule:

    • Go to "Monitor" -> "Alerts" -> "New alert rule."
    • Configure the alert rule with the following settings:
    • Resource: Your Application Gateway
    • Condition: Use the Log Analytics query you created in step 3.
    • Action group: Select the action group you created in step 4.
    • Evaluation frequency: Set it to your desired frequency (e.g., every 5 minutes).
    • Severity: Set the appropriate severity.
    • Enable the alert rule.

    Set Alert Suppression (Optional):

    • If you don't want to receive alerts continuously for the same issue within a short timeframe, you can set up alert suppression. This prevents multiple alerts for the same issue within a specified period.

    With these steps, Azure Monitor Alerts will continuously evaluate the query you created in Log Analytics and trigger email notifications to your team whenever the backend health condition matches the criteria defined in your query. The alerts will continue to trigger until the issue is resolved or the alert suppression period expires.

    MS doc link for ref -->

0 additional answers

Sort by: Most helpful