You can monitor the health of your Elastic Compute Service (ECS) instances to ensure that your users can always access your websites and applications, process data, or render videos. Alibaba Cloud provides data monitoring, visualization of monitoring data, and real-time alerts to help ensure that your ECS instances are running normally.

Background information

You can monitor your instances by using the ECS or CloudMonitor console. You can use the ECS console to monitor the vCPU utilization, network traffic, and disk I/O of instances. However, if you want to monitor resources in a more fine-grained manner, you are likely better off using the CloudMonitor console. The following section describes some monitoring metrics for ECS instances:
  • vCPU utilization: the percentage of allocated compute units that are currently in use on an ECS instance. A higher percentage indicates a higher vCPU load on the instance. You can view the monitoring data of an ECS instance by using the ECS or CloudMonitor console or by calling ECS API operations. You can also connect to an ECS instance to view its monitoring data. You can use one of the following methods to view the vCPU utilization of an ECS instance after you connect to the instance:
    • Windows instance: View the vCPU utilization in Task Manager. You can sort processes by vCPU utilization to identify processes that are consuming the vCPUs of the instance.
    • Linux instance: Run the top command on the instance to view its vCPU utilization. Press Shift+P to sort processes by vCPU utilization and identify processes that are consuming the vCPUs of the ECS instance.
  • Network traffic-related metrics: the inbound and outbound bandwidth usages of the ECS instance in Kbit/s. ECS monitors public bandwidth usage, whereas CloudMonitor monitors both public and internal bandwidth usage. If an outbound public bandwidth of 1,024 Kbit/s is allocated to an ECS instance and the outbound public bandwidth usage by the instance reaches 1 Mbit/s, the allocated outbound public bandwidth is considered to be fully utilized.
    Note The monitoring data of public bandwidth over classic network does not include back-to-origin traffic. To view the complete monitoring data, log on to the CloudMonitor console.

View monitoring data in the ECS console

To view monitoring data of an ECS instance in the ECS console, perform the following steps.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. On the Instances page, find the instance that you want to monitor and click its ID.
  5. On the Instance Details page, click the Monitoring tab.
  6. Specify a time range to query the monitoring data of the instance, such as vCPU utilization and memory usage.
    Instance monitoring
    Note
    • The length of the specified time range affects the granularity of the data displayed. As the time range decreases, the resolution of displayed data increases. For example, the aggregation interval is different for a 1 hour period and 6 hour period, which results in different average values.
    • Whether the CloudMonitor agent is installed on an ECS instance results in different monitoring data that is viewed in the ECS console.
      • If the CloudMonitor agent is not installed on the ECS instance, the data of metrics in the ECS console are the same as that of basic metrics in the CloudMonitor console.
      • If the CloudMonitor agent is installed on the ECS instance, the data of metrics (excluding operating system metrics) in the ECS console are the same as that of basic metrics in the CloudMonitor console. CPU utilization, memory usage, and system load are operating system metrics whose data is obtained from instance operating systems.

      Operating system metrics are collected every 15 seconds. Basic metrics are collected every minute. For more information, see Metrics.

You can also call ECS API operations such as DescribeInstanceMonitorData, DescribeDiskMonitorData, and DescribeEniMonitorData to query monitoring data.

The following table describes the metrics of instances that have no CloudMonitor agent installed. The collection interval is one minute.
Metric Description Unit MetricName Dimensions Statistics
(ECS)CPUUtilization The CPU utilization. % CPUUtilization userId and instanceId Maximum, Minimum, and Average
(ECS)InternetInRate(Classic Network) The average rate of inbound Internet traffic. bit/s InternetInRate userId and instanceId Maximum, Minimum, and Average
(ECS)IntranetInRate The average rate of inbound internal network traffic. bit/s IntranetInRate userId and instanceId Maximum, Minimum, and Average
(ECS)InternetOutRate(Classic Network) The average rate of outbound Internet traffic. bit/s InternetOutRate userId and instanceId Maximum, Minimum, and Average
(ECS)IntranetOutRate The average rate of outbound traffic over the internal network. bit/s IntranetOutRate userId and instanceId Maximum, Minimum, and Average
(ECS)DiskReadBPS The number of bytes that are read from the system disk per second. Byte/s DiskReadBPS userId and instanceId Maximum, Minimum, and Average
(ECS)DiskWriteBPS The number of bytes that are written to the system disk per second. Byte/s DiskWriteBPS userId and instanceId Maximum, Minimum, and Average
(ECS)DiskReadIOPS The number of read operations that are performed on the system disks per second. Count/s DiskReadIOPS userId and instanceId Maximum, Minimum, and Average
(ECS)DiskWriteIOPS The number of write operations that are performed on the system disks per second. Count/s DiskWriteIOPS userId and instanceId Average, Minimum, and Maximum
(ECS)InternetInRate_IP The inbound bandwidth from the Internet. bit/s VPC_PublicIP_InternetInRate userId, instanceId, and ip Maximum, Minimum, and Average
(ECS)InternetOutRate_IP The outbound bandwidth to the Internet. bit/s VPC_PublicIP_InternetOutRate userId, instanceId, and ip Maximum, Minimum, and Average
(ECS)InternetOutRatePercent_IP The utilization of the outbound bandwidth to the Internet. % VPC_PublicIP_InternetOutRate_Percent userId, instanceId, and ip Average
(ECS)InternetIn(Classic Network) The inbound traffic over the Internet. Byte InternetIn userId and instanceId Average, Minimum, Maximum, and Sum
(ECS)InternetOut(Classic Network) The outbound traffic over the Internet. Byte InternetOut userId and instanceId Maximum, Minimum, and Average
(ECS)IntranetInRate The inbound traffic over the internal network. Byte IntranetInRate userId and instanceId Maximum, Minimum, and Average

View monitoring data in the CloudMonitor console

CloudMonitor provides end-to-end and out-of-box monitoring solutions for enterprises in the cloud. CloudMonitor provides the host monitoring service to monitor ECS instances.
  • For more information about the host monitoring service, see Overview.
  • For more information about the host monitoring metrics, see Metrics.

To view monitoring data of an ECS instance in the CloudMonitor console, perform the following steps.

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Host Monitoring.
  3. Find the ECS instance that you want to monitor.
  4. Optional:Click Install/Upgrade Agent to install the CloudMonitor agent.
    If the CloudMonitor agent is not installed on the instance, you can install the agent on the instance. For more information, see Install and uninstall the CloudMonitor agent for C++.
    • If the CloudMonitor agent is not installed on the instance, you can only view basic metrics in the CloudMonitor console.
    • If the CloudMonitor agent is installed on the instance, you can view both basic metrics and operating system metrics in the CloudMonitor console.
  5. To obtain monitoring data, click the Monitoring icon icon in the Actions column.
    Note Monitoring data can be retained for up to 30 days.
  6. Click Alert Rules to configure alert rules.