All Products
Search
Document Center

File Storage NAS:Configure an advanced alert rule

Last Updated:Nov 14, 2024

You can use CloudMonitor to configure only threshold-triggered alert rules based on specific metrics. If you need to configure an alert rule that is triggered based on the computing results of multiple metrics, you can use Hybrid Cloud Monitoring.

Prerequisites

Procedure

  1. Import NAS metrics.

    1. Log on to the CloudMonitor console.

    2. In the left-side navigation pane, choose Hybrid Cloud Monitoring > Namespace.

    3. On the Namespace page, find the namespace that you want to configure. Then, click an icon (indicating the number of accounts, number of cloud services, number of metrics, or number of tasks that you want to add to the namespace) in the Metric Data column.

    4. On the Alibaba Cloud Service Metrics tab of the Metric management panel, add NAS metrics.

      1. Add the NAS service.

        1. Click the image.png icon next to Current Account.

        2. In the Add Product dialog box, select Apsara File Storage NAS and click OK.

      2. Add NAS metrics.

        1. Click Apsara File Storage NAS and then click Add metric.

        2. In the Add metric dialog box, select the metrics that you want to add and click OK.

          Note

          Both NAS metrics and Cloud Parallel File Storage (CPFS) metrics can be monitored in the CloudMonitor console. CPFS metrics are available in the Add metric dialog box. You must select the metrics whose Metric Category is NAS. For more information about NAS metrics, see Metrics.

  2. Create an alert rule.

    1. On the Namespace page, click Create Alert Rule.

    2. In the Create Alert Rule panel, configure the parameters. The following table describes the parameters.

      Parameter

      Description

      Rule Name

      The name of the alert rule.

      Namespace

      Select the namespace that is specified in Step 1.

      Alert Expression

      The condition that triggers alerts. If a metric meets the specified condition, an alert is triggered.

      Tag

      The tags of the alert rule. You can set the key and value of each tag.

      Annotations

      The annotations of the alert rule. You can set the key and value of each annotation.

      Mute For

      The interval at which CloudMonitor resends alert notifications before an alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

      If the value of a metric reaches the alert threshold, CloudMonitor sends alert notifications.

      • If the alert is triggered again within the mute period, CloudMonitor does not resend alert notifications.

      • If the alert is not cleared after the mute period ends, CloudMonitor resends alert notifications.

      For example, if Mute For is set to 12 Hours and the alert is not cleared, CloudMonitor resends an alert notification 12 hours later.

      Effective Period

      The period during which the alert rule is effective. CloudMonitor monitors the specified resources based on the alert rule only within the specified period.

      Alert Contact Group

      The alert contact groups to which alert notifications are sent.

      The alert notifications of the application group are sent to the alert contacts that belong to the selected alert contact groups. An alert contact group can contain one or more alert contacts.

      For information about how to create an alert contact and an alert contact group, see Create an alert contact or alert contact group.

      Notification Methods

      The alert level and the methods that are used to send alert notifications. Valid values:

      Info (Email + Webhook)

      You can specify the consecutive periods of time during which the metric value exceeds the threshold before an alert is triggered. Valid values of the consecutive cycles: 1, 3, 5, 10, 15, 30, 60, 70, 90, 120, and 180. One consecutive cycle is equal to 1 minute.

      Alert Callback

      The callback URL that can be accessed over the Internet. CloudMonitor sends HTTP POST requests to push alert notifications to the specified URL. You can enter only an HTTP URL.

      To test the connectivity of an alert callback URL, perform the following steps:

      1. Click Test next to the callback URL.

        In the Webhook Test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.

        Note

        To obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.

      2. Click Close.

      Auto Scaling

      If you turn on Auto Scaling, the specified scaling rule is enabled when an alert is triggered. In this case, you must configure the Region, ESS Group, and ESS Rule parameters.

      Log Service

      If you turn on Log Service, the alert information is written to the specified Logstore in Simple Log Service when an alert is triggered. In this case, you must configure the Region, ProjectName, and Logstore parameters.

      For information about how to create a project and a Logstore, see Getting Started.

      Message Service - topic

      If you turn on Message Service - topic, the alert information is written to the specified topic in Message Service when an alert is triggered. In this case, you must configure the Region and topicName parameters.

      For information about how to create a topic, see Create a topic.

      Function Compute

      If you turn on Function Compute, an alert notification is sent to Function Compute for format processing when an alert is triggered. In this case, you must configure the Region, Service, and Function parameters.

      For information about how to create a service and a function, see Quickly create a function.

      Method to handle alerts when no monitoring data is found

      The method that is used to handle alerts when no monitoring data is found. Valid values:

      • Do not do anything (default)

      • Send alert notifications

      • Treated as normal

    3. Click OK.

  3. Optional. View the created alert rule.

    In the left-side navigation pane, choose Alerts > Alert Rules.

    On the Alert Rules page, the alert rule whose Product Name is Prometheus is the one that you created.

References