This topic describes how to monitor Apsara File Storage NAS file systems and how to configure alarm rules in the CloudMonitor console.

Prerequisites

A file system is created. For more information, see Create a file system.

Background information

You can use CloudMonitor to view performance metrics of Apsara File Storage NAS file systems and configure alarm rules for each metric. Supported performance metrics include read/write throughput, input/output operations per second (IOPS), latency, and metadata queries per second (QPS). Supported notification methods include voice calls, short message service (SMS) messages, and emails.

View performance metrics

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Dashboard > Dashboards.
  3. On the Dashboards page, select NAS from the Product drop-down list, and select a region and file system in the FileSystem field to view monitoring charts.
    View monitoring charts
    Note If the No Data message is displayed in a chart, it indicates that no request is sent from the specified file system to the associated backend server for a long period of time. If you want to simulate data to measure the write throughput of a file system, run the fio command on an Elastic Compute Service (ECS) instance on which the file system is mounted. The following command is an example where /mnt is used as the mount directory: 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.

Configure alarm rules

  1. Log on to the CloudMonitor console.
  2. Choose Alarms > Alarm Rules. On the Alarm Rules page, click Create Alarm Rule.
  3. On the Create Alarm Rule page, specify the required parameters.
    Parameter Description
    Related Resources In the Related Resource section, complete the following settings:
    • From the Product drop-down list, select NAS.
    • From the Resource Range drop-down list, select FileSystem.
    • From the Region drop-down list, select the region where the target file system resides.
    • From the FileSystem drop-down list, select the target file system.
    Set Alarm Rules You can set multiple alarm rules based on your business requirements. For more information, see Alarm rule parameters.
    Notification Methods You can 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 and an alert contact group.

  4. Click Confirm to enable the alarm rule.

    CloudMonitor sends alarms to the contacts when the value of a metric exceeds the specified threshold. This allows you to monitor the status of the file system in real time and resolve issues in a timely manner.

Monitor multiple file systems

If you want to monitor multiple file systems, you can create a group and add these file systems to the group. On the Application Groups page, you can group multiple file systems.

  1. Log on to the CloudMonitor console.
  2. Create a group.
    For more information, see Create an application group.
    1. In the left-side navigation pane, click Application Groups. On the page that appears, click Create Group.
    2. In the Create Group dialog box, set the required parameters.
      Parameter Description
      Creation method The method that is used to create the group. For example, select Standard Group creation.
      Product Group Name The name of the group.
      Contact Group The contact group that receives notifications.

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

      MonitorAlarm Select an alarm template from the Select Template drop-down list. Select an interval from the Muted drop-down list. Alarms will be sent at the selected interval.

      If you turn on the Initialize Agent Installation switch, CloudMonitor installs a CloudMonitor agent on all the instances in the application group. Then, the CloudMonitor agent can be used to collect monitoring data.

      Subscribe Event Notification After you select Subscription Event Notification, alarm notifications are sent if critical and warning events occur in the file systems within the group.
    3. Click Create Group to create a group.
  3. Add a product.
    1. Click the name of the group to go to the Group Details page.
    2. In the left-side navigation pane, click Group Resource. On the page that appears, click Add Product.
    3. In the AddResource dialog box, select the required product and instance that you want to monitor.
    4. Click Confirm to add a resource.
  4. View monitoring charts.
    1. Click the name of the group to go to the Group Details page.
    2. In the left-side navigation pane, click Dashboards, select the required file system, and view the related monitoring charts.
      View monitoring charts
      Note If the No Data message is displayed in a chart, it indicates that no request is sent from the specified file system to the associated backend server for a long period of time. If you want to simulate data to measure the write throughput of a file system, run the fio command on an Elastic Compute Service (ECS) instance on which the file system is mounted. The following command is an example where /mnt is used as the mount directory: 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.
  5. Configure an alarm rule.
    1. Click the name of the group to go to the Group Details page.
    2. In the left-side navigation pane, click Alarm Rule. On the Threshold Value Alarm tab, click Create Alarm Rule.
    3. In the dialog box that appears, click Add Rules, and configure the required settings. After the configuration is complete, click OK.
      Add an alarm rule
    4. Specify the Muted and Contact Group fields and click Add.
      Configure notification methods

Use API operations to query metrics

You can use the following CloudMonitor API operations to query metrics of NAS file systems.

The following table describes the required parameters.

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