You can use Cloud Monitor to monitor performance metrics of Apsara File Storage NAS, such as read and write throughput, IOPS, latency, and metadata queries per second (QPS). You can also configure alert rules for the metrics to obtain exception information at the earliest opportunity. This topic describes how to monitor the performance metrics of a file system, configure alert rules, monitor multiple file systems, and query metrics by calling API operations.

Prerequisites

The Cloud Monitor service is activated.

To activate the Cloud Monitor service, go to the Cloud Monitor service page and perform the operations as prompted.

Monitor the performance metrics of a file system

  1. Log on to the Cloud Monitor console.
  2. In the left-side navigation pane, choose Dashboard > Cloud product charts.
  3. Select NAS from the cloud service drop-down list, select a region, and then select a file system to view the monitoring charts.
    View monitoring charts
    Note
    • If No Data is displayed in the chart, it indicates that no request is sent from the specified file system to the backend server for a long period of time.
    • You can test the performance of a file system by using the fio tool and view the charts of performance metrics in the Cloud Monitor console. For more information, see Performance.

      To test the write throughput of the file system, run the fio command on an Elastic Compute Service (ECS) instance on which the file system is mounted. In this example, the mount directory is /mnt. You can run the following command on the ECS instance: fio -numjobs=1 -iodepth=128 -direct=1 -ioengine=libaio -sync=1 -rw=randwrite -bs=1M -size=1G -time_based -runtime=600 -name=Fio -directory=/mnt.

    • The IOPS and metadata QPS values are both integers. If the number of requests within one minute is less than 60, 0 is displayed.

Configure alert rules

  1. Log on to the Cloud Monitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules. On the Alert Rules page, click Create Alert Rule.
  3. On the Create Alert Rule page, set the following parameters.
    Parameter Description
    Related Resource In the Related Resource section, set the following parameters:
    • Select NAS from the Product drop-down list.
    • Select FileSystem from the Resource Range drop-down list.
    • Select the region where the file system resides from the Region drop-down list.
    • Select the file system from the FileSystem drop-down list.
    Set Alert Rules Configure alert rules based on your business requirements. You can create multiple alert rules at a time. For more information, see Alarm rule parameters.
    Notification Method Configure notification contacts and notification methods.

    Click Quickly create a contact group to create a contact group. For more information, see Create an alert contact or alert group.

  4. Click Confirm.

    Alert notifications are automatically sent if the value of a metric exceeds the specified threshold. This allows you to obtain the exception information at the earliest opportunity.

Monitor multiple file systems

  1. Log on to the Cloud Monitor console.
  2. Create a group.
    1. In the left-side navigation pane, click Application Groups. On the page that appears, click Create Group.
    2. In the Create Group panel, select Standard Group creation as Creation method and set the following parameters.
      Parameter Description
      Basic Information Set the Product Group Name and Contact Group parameters. Valid values:
      • Product Group Name: the name of the application group.
      • Contact Group: the alert group to which alert notifications are sent. You can select an existing alert group or create an alert group.
      MonitorAlert Set the Select Template and Muted parameters. Valid values:
      • Select Template: the alert template used to initialize alert rules of the application group.

        For more information about how to create an alert template, see Create an alert template.

      • Muted: the interval of re-sending the notification for an alert before the alert is cleared. The minimum value is 5 minutes and the maximum value is 24 hours.
      Initialize Agent Installation After you turn on Initialize Agent Installation, Cloud Monitor automatically installs the Cloud Monitor agent on the instances in the application group to collect monitoring data from the instances.
      Event Monitor If you select Subscribe Event notification, Cloud Monitor automatically sends alert notifications to you when critical or warning events occur on the instances added to the application group.
    3. Click Create Group.
  3. Add a service.
    1. On the Application grouping tab, click the group.
    2. In the left-side navigation pane of the group details page, click Group Resource and click Add Product.
    3. In the AddResource panel, select the service and instance that you want to monitor.
    4. Click Confirm.
  4. View the monitoring charts.
    1. On the Application grouping tab, click the group.
    2. In the left-side navigation pane of the group details page, click Dashboards, select the file system from the drop-down list, and then view the monitoring charts.
      View the monitoring charts
  5. Configure an alert rule.
    1. On the Application grouping tab, click the group.
    2. In the left-side navigation pane of the group details page, click Alert Rule.
    3. On the Threshold Value Alert tab, click Create Alert Rule.
    4. In Rule section of the Add or Edit Rules panel, click Add Rules, set the parameters, and then click OK.
      Create an alert rule
    5. In the Alert mechanism section, select the effective time from the Effective Time drop-down list and the contact group from the Contact Group drop-down list.
      Configure the alert mechanism
    6. Click Add.

Query metrics by calling API operations

You can call the Cloud Monitor API operations to query the metrics of NAS:

  • DescribeMetricMetaList: queries the description of time series metrics that is available in Cloud Monitor.
  • DescribeMetricList: queries the monitoring data of time series metrics of cloud services within a specified time period.
  • DescribeMetricLast: queries the latest monitoring data of a specific metric.

The following table lists the parameters.

Parameter Valid value
Namespace acs_nas
MetricName IopsRead, IopsWrite, LatencyRead, LatencyWrite, QpsMeta, ThruputRead, and ThruputWriteIopsRead
Dimensions {"userId":"xxxxxx","fileSystemId":"xxxxx"}