All Products
Search
Document Center

Enterprise Distributed Application Service:Create an alert rule for application monitoring and manage alert notifications

Last Updated:Aug 30, 2024

This topic describes how to create an alert rule for application monitoring and manage alert notifications.

Prerequisites

Your application is connected to Application Real-Time Monitoring Service (ARMS) for monitoring. For more information, see Application Monitoring overview.

Background information

Enterprise Distributed Application Service (EDAS) allows you to configure alert rules for various metrics that are collected from monitored applications. You can create alert rules based on your business requirements and scenarios. This allows you to receive alert notifications when your applications do not work as expected and to troubleshoot issues at the earliest opportunity. This topic describes how to use alert rules for EDAS application monitoring.

In the following scenario, requests to the core services have a long response time, or the success rate of requests decreases.

The user-service application is used in this example. user-service is a Java application deployed in a Container Service for Kubernetes (ACK) cluster and is monitored by EDAS.

The user-service application runs the core services of an enterprise. Its API operations must be highly available. When the response time of API requests increases, or the request success rate decreases, O&M engineers must be notified to troubleshoot issues at the earliest opportunity.

In this scenario, O&M engineers need to observe the following metrics:

  • The average response time of API requests to the services that are run by the application

  • The success rate of API requests to the services that are run by the application

Step 1: Verify whether the application is monitored

To verify whether the user-service application is monitored, perform the following operations:

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. On the Applications page, find the user-service application and click the application name.

    1. On the page that appears, choose Application Monitoring > Application Overview in the left-side navigation pane.

    2. On the Application Overview page, check whether data is displayed.

    If the data of the application is displayed on the page, the user-service application is monitored. If no data is displayed, the application is not monitored. In this case, enable application monitoring for the application.

    Note

    The user-service application is a Java application deployed in an ACK cluster. The information displayed on the page varies with the application type.

Step 2: Go to the Create Application Monitoring Alert Rule page

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, click Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, find the application that you want to deploy and click the application name.

  3. In the left-side navigation pane, choose Alert Management > Alert Rule.

  4. In the upper-right corner of the Application Monitoring Alert Rules page, click Create Application Monitoring Alert Rule.

  5. On the Create Application Monitoring Alert Rule page, set the Select Applications parameter to user-service and the Metric Type parameter to Invocation_Type.

Step 3: Create an alert rule for application monitoring

In this example, two alert rules are created. When you create the alert rules, specify that alert notifications are sent to contacts by using text messages, emails, or DingTalk group messages.

  • An alert rule that is used to monitor the response time of requests to the user-service application:

    An alert notification is sent if the response time of API requests to the services that are run by the application is equal to or longer than 500 ms in the previous three minutes.

  • An alert rule that is used to monitor the request success rate for the user-service application:

    An alert notification is sent if the success rate of API requests to the services that are run by the application is equal to or lower than 90% in the previous three minutes.

Note

The response time and success rate of API requests may fluctuate within a short period of time. In this case, your core business is not affected. However, if this situation persists, you must check the API operations provided by your application. When you configure an alert rule, you can specify a period of time during which an exception persists. For example, an alert notification is sent if the average response time remains long, or the request success rate is lower than 90% for three minutes. When you create alert rules for application monitoring, you can specify different conditions based on your requirements.

  1. On the Create Application Monitoring Alert Rule page, enter a name for the alert rule and specify the conditions that trigger an alert.

    In this example, an alert rule is created and used to monitor the request response time for the user-service application.

  2. Specify a notification policy for the alert rule.

    • If you have created notification policies, select a notification policy from the Notification Policy drop-down list.

    • If no notification policy is available, perform Step 3 to create a notification policy. After a notification policy is created, click the Refresh icon next to the Notification Policy drop-down list on the Create Application Monitoring Alert Rule page, and select the notification policy that you created from the drop-down list.

  3. (Optional) Click Quickly create notification policies next to the Notification Policy drop-down list.

    In the Quickly create notification policies panel, configure the parameters and click Confirm.

    • If you have created a contact, select the contact from the Contact drop-down list.

    • If no contact is available, perform Step 4 to create a contact. After a contact is created, reopen the Quickly create notification policies panel and select the contact that you created from the Contact drop-down list.

    新建通知策略

  4. (Optional) Click Create Contact next to the Contact drop-down list.

    On the page that appears, you can create a contact or a contact group, or add a DingTalk group to receive alert notifications.

    1. On the Contact tab, click Create Contact.

    2. In the Create Contact dialog box, configure the parameters based on your business requirements and click OK.

    3. On the Contact Group tab, click Create Contact Group in the upper-right corner.

    4. In the Create Contact Group dialog box, specify a group name, add the contact that you created in the preceding step to the contact group, and then click OK.

      After you create the contact group, the contact group is displayed on the Contact Group tab.

    5. On the IM robot tab, click Create a robot in the upper-right corner.

    6. In the Create a robot dialog box, configure the parameters for the DingTalk group and click OK.

      After you add the DingTalk group to receive alert notifications, the DingTalk group is displayed on the IM robot tab.新建钉群

  5. After the alert rule is configured, click Save.

  6. Repeat the preceding steps to create an alert rule that is used to monitor the request success rate for the user-service application.

    To view the alert rules that you created, choose Alert Management > Alert Rule in the left-side navigation pane.

Handle alerts

After you receive alert notifications, you can view all the alert notifications and the time each notification was sent on the Alert page.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, click Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, find the application that you want to deploy and click the application name.

  3. Go to the details page of the application that you want to manage. In the left-side navigation pane, choose Alert Management > Alert sending History.

    The Alert page appears. On this page, you can view all alert notifications and the time each notification was sent. For more information, see View alert records.