All Products
Search
Document Center

Elastic Compute Service:Use CloudMonitor to monitor websites deployed on ECS instances

Last Updated:Feb 08, 2024

CloudMonitor helps reduce the O&M costs and workloads of cloud services. CloudMonitor provides real-time operation data that you can use to identify risks in advance, troubleshoot issues, and prevent potential loss.

Prerequisites

Before you use CloudMonitor, make sure that the following requirements are met:

  • The CloudMonitor agent is running on the Elastic Compute Service (ECS) instances that you want to monitor and is able to collect metric data. If the CloudMonitor agent is not installed on the instances, manually install it. For more information, see Install the CloudMonitor agent for Java.

  • Alert contacts and contact groups are added. We recommend that you add at least two contacts to ensure real-time responses to monitoring alerts. For more information about monitoring metrics, see Alert service and Overview.

Background information

The dashboard feature of CloudMonitor provides system-wide visibility into resource utilization and operational health. In this topic, the CPU utilization, memory usage, and disk usage of ECS instances are separately displayed, and the four metrics of ApsaraDB RDS instances are displayed in two groups.

指标展示效果图

This topic describes how to configure CloudMonitor. In this topic, a website, ECS, RDS, Object Storage Service (OSS), and Server Load Balancer (SLB) are used as examples.

image

Configure alert thresholds and alert rules

We recommend that you configure suitable alert thresholds for monitoring metrics based on your business requirements. A lower-than-expected threshold may lead to frequent triggering of alerts and affect user experience. A higher-than-expected threshold may leave you with insufficient time to respond to alerts.

For example, to reserve processing capacity to ensure the normal operation of the system, you can set the alert threshold for CPU utilization to 70% and configure an alert to be triggered when the threshold is exceeded three consecutive times, as shown in the following figure.设置CPU告警阈值

If you want to configure alert rules for other metrics, click Add Alert Rule. For example, you can perform the following operations:

  • Configure alert rules for RDS instances

    We recommend that you configure alert rules for RDS instances based on your business requirements. For example, you can set the alert threshold for the CPU utilization of RDS instances to 70% and configure an alert to be triggered when the threshold is exceeded three consecutive times. You can configure alert thresholds for disk usage, IOPS utilization, and the total number of connections based on your business requirements. For information about how to view the information about monitoring metrics, see Cloud service monitoring.

    设置RDS监控

  • Configure alert rules for SLB instances

    Before you use CloudMonitor for SLB instances, make sure that health check is enabled for SLB instances and configure alert rules for SLB instances based on your business requirements. For example, you can set the alert threshold for the bandwidth of SLB instances to 7 Mbit/s, as shown in the following figure.设置负载均衡监控

Configure process monitoring

For web applications, you can configure process monitoring to monitor application processes in real time and use monitoring data to troubleshoot issues. For more information, see Process monitoring.

Configure site monitoring

Site monitoring is an external monitoring service provided for ECS instances and is used to simulate real user access scenarios and test business availability in real time. The monitoring data can also be used to troubleshoot issues.

设置站点监控

If the preceding monitoring metrics do not meet your requirements, you can use the custom monitoring feature. For more information, see Overview.