

# Accessing CloudWatch metrics for Amazon EFS
<a name="accessingmetrics"></a>

You can view Amazon EFS metrics for CloudWatch in several ways:
+ In the Amazon EFS console
+ In the CloudWatch console
+ Using the CloudWatch CLI
+ Using the CloudWatch API

## To view CloudWatch metrics and alarms (Amazon EFS console)
<a name="view-metrics-console"></a>

1. Sign in to the Amazon Web Services Management Console and open the Amazon EFS console at [ https://console.amazonaws.cn/efs/](https://console.amazonaws.cn/efs/).

1. Choose **File systems**.

1. Choose the file system that you want to view CloudWatch metrics for.

1. Choose **Monitoring** to display the **File system metrics** page.

   The **File system metrics** page displays a default set of CloudWatch metrics for the file system. Any CloudWatch alarms that you have configured also display with these metrics. For file systems that use Max I/O performance mode, the default set of metrics includes Burst Credit balance in place of Percent IO limit. You can override the default settings using the **Metrics settings** dialog box, accessed by opening the settings. 
**Note**  
The Throughput utilization (%) metric is not a CloudWatch metric; it is derived using CloudWatch metric math.

1. You can adjust the way metrics and alarms are displayed using the controls on the **File system metric** page, as follows.
   + Toggle the **Display mode** between **Time series** or **Single value**.
   + Show or hide any CloudWatch alarms configured for the file system.
   + Choose **See more in CloudWatch** to view the metrics in CloudWatch.
   + Choose **Add to dashboard** to open your CloudWatch dashboard and add the displayed metrics.
   + Adjust the metric time window displayed from 1 hour to 1 week.

## To view CloudWatch metrics and alarms (CloudWatch console)
<a name="view-metrics-cw-console"></a>

1. In the navigation pane, choose **Metrics**. 

1. Select the **EFS** namespace.

1. (Optional) To view a metric, enter its name in the search field.

1. (Optional) To filter by dimension, select **FileSystemId**.

## To access metrics from the Amazon CLI
<a name="view-metrics-cli"></a>
+ Use the [https://docs.amazonaws.cn/cli/latest/reference/cloudwatch/list-metrics.html](https://docs.amazonaws.cn/cli/latest/reference/cloudwatch/list-metrics.html) command with the `--namespace "AWS/EFS"` namespace. For more information, see the [Amazon CLI Command Reference](https://docs.amazonaws.cn/cli/latest/reference/).

## To access metrics from the CloudWatch API
<a name="view-metrics-cli"></a>
+ Call `[https://docs.amazonaws.cn/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html](https://docs.amazonaws.cn/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)`. For more information, see the [Amazon CloudWatch API Reference](https://docs.amazonaws.cn/AmazonCloudWatch/latest/APIReference/). 