All Products
Search
Document Center

Cloud Parallel File Storage:Configure an advanced alert rule

Last Updated:Mar 28, 2024

You can use CloudMonitor to configure only threshold-triggered alert rules based on specific metrics. If you want to configure an alert rule for multiple metrics based on a proportional ratio, such as 80% of the total storage space, you can create an advanced alert rule by using Hybrid Cloud Monitoring.

Prerequisites

Procedure

  1. Add CPFS 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 in the Metric Data column.

    4. On the Alibaba Cloud Service Metrics tab of the Metric management panel, click Add metric to add CPFS metrics.

      Note

      CPFS and Apsara File Storage NAS (NAS) share the same console. To add CPFS metrics, you must select NAS as the service. Then, select the metrics whose Metric Category is Cloud Parallel File Storage (CPFS). For more information about CPFS metrics, see the "Metrics" section of the Overview topic.

      1. Add the NAS service.

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

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

      2. Add CPFS metrics.

        1. Click Apsara File Storage NAS and then Add Metric.

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

  2. Create an alert rule.

    1. In the upper-left corner of 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

      The namespace that you want to use. Select the namespace to which you added CPFS metrics in Step 1.

      Alert Expression

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

      For example, you can configure the following condition: File system data volume/Total storage space > 80%. Sample expression:

      AliyunNas_CPFSCapacityUsed{fileSystemId="cpfs-192ec9bd1a47xxxx"} / AliyunNas_CPFSCapacity{fileSystemId="cpfs-192ec9bd1a47xxxx"} > 0.8
      Note

      When you create a rule that triggers an alert based on the proportional ratio of the number of allocated files to the maximum number of files, the number of allocated files cannot be greater than the maximum number of files.

      Tags

      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 the alert is cleared. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

      An alert is triggered when the condition of the alert rule is met. 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.

      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 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:

      • Critical (Phone Call + Text Message + Email + Webhook)

      • Warning (Text Message + Email + Webhook)

      • Info (Email + Webhook)

      You can specify the number of consecutive cycles. An alert is triggered only if the metric value remains higher than the threshold in the specified consecutive cycles. Valid values: 1, 3, 5, 10, 15, 30, 60, 70, 90, 120, and 180. One cycle equals to one minute.

      Alert Callback

      The 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 more 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 (MNS) when an alert is triggered. In this case, you must select a region and a topic.

      For more 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 more 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