Monitoring and logging help ensure the availability and health of your Cloud Storage Gateway (CSG) resources and your applications. You can use monitoring capabilities to collect resource usage information. Alibaba Cloud provides a variety of monitoring and log auditing services, such as CloudMonitor and Cloud Config. These services can monitor resource usage and service performance in real time, and generate alerts to help you handle exceptions at the earliest opportunity.
Gateway resource monitoring
You can monitor gateways in real time in the CSG console. For more information, see Monitoring.
On the Monitoring tab of the gateway details page, you can check the CPU, memory, cache disk IOPS, and cache disk read/write operations within a selected time range.

Health monitoring
Resource health monitoring allows you to detect and handle exceptions at the earliest opportunity. For more information, visit Alibaba Cloud Health Status.
On the Alibaba Cloud Health Status page, you can check the health status of each service in different regions and subscribe to Really Simple Syndication (RSS) feeds about service exceptions.

Basic monitoring with CloudMonitor
CSG is integrated with Alibaba CloudMonitor. You can use CloudMonitor to monitor the metrics of cloud resources and Internet applications in real time free of charge. You can use CloudMonitor to monitor the running status, usage, and exceptions of resources of cloud services in real time.
You can go to the CloudMonitor console or use the CloudMonitor API to view the usage data of CSG resources. For more information, see Monitoring.
Use the CloudMonitor console
To view CSG resource information in the CloudMonitor console, go to the Cloud Service Monitoring page and choose .
Use the CloudMonitor SDK
call the DescribeMetricList operation. The operation allows you to check the gateway performance metrics (cpu_user, mem_used_percent, and nfs_used_connection_percent), share performance metrics (cache_used_percent, meta_used_percent, rw_rate, throttling, and upload_rate), and volume performance metric (ol_cache_used_percent).
You can configure alert rules for metrics in the CloudMonitor console. If the conditions that are specified in an alert rule are met, CloudMonitor automatically notifies you of anomalies so that you can troubleshoot errors at the earliest opportunity.
Event monitoring with ActionTrail
CSG is integrated with ActionTrail. You can use ActionTrail to monitor and record the operations performed by Alibaba Cloud accounts. In addition, ActionTrail can analyze security risks, detect intrusions, track changes, and perform compliance auditing.
ActionTrail can generate logs for cloud service access and usage by using the Alibaba Cloud Management Console, API operations, and developer tools. For more information, see Audit events of Cloud Storage Gateway.
By default, ActionTrail tracks and retains events within the last 90 days. If you want to save events for more than 90 days, you can create a trail to deliver events to a Simple Log Service (SLS) Logstore as logs or to an OSS bucket as log objects. For more information, see Step 1: Create a trail.
After you create a trail to deliver events to an SLS Logstore or OSS bucket, you can query or analyze the events in the SLS or OSS console. For more information, see Query events in the Simple Log Service or OSS console.
If you want to trace a historical event, submit a ticket to request for the required permissions.
Logging
CSG is integrated with SLS. After you enable log monitoring in the CSG console, gateway logs are imported into the specified Logstore. You can use logs for query and analysis purposes, for example, checking the synchronization list of gateway files.
For more information about how to enable log monitoring in the CSG console, see Enable log monitoring. Log data is retained for 30 days by default. You can change the retention period based on your business requirements. For more information, see Modify the configurations of a logstore.