You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Understanding how to monitor your Alibaba Cloud resources and manage costs is just as important as knowing how to build with them. This lesson covers CloudMonitor, Log Service, ActionTrail, and billing tools.
CloudMonitor is Alibaba Cloud's primary monitoring service. It collects metrics from your cloud resources and enables alerting.
CloudMonitor automatically collects metrics from Alibaba Cloud services:
| Service | Example Metrics |
|---|---|
| ECS | CPU utilisation, memory usage, disk I/O, network traffic |
| RDS | Connections, IOPS, storage usage, replication delay |
| OSS | Request count, bandwidth, error rate |
| SLB | Active connections, request rate, latency |
| Function Compute | Invocations, duration, errors |
Define alert rules to notify you when metrics exceed thresholds:
Example alert: If ECS CPU utilisation exceeds 80% for 5 consecutive minutes, send an alert to the Operations team via DingTalk.
Create custom dashboards to visualise metrics:
Install the CloudMonitor agent on ECS instances for detailed OS-level metrics:
Log Service (SLS) is a fully managed platform for log collection, processing, and analysis. It is the equivalent of AWS CloudWatch Logs + OpenSearch combined.
| Capability | Description |
|---|---|
| Log Collection | Collect logs via Logtail agent, SDKs, Kafka protocol, or Syslog |
| Log Query | SQL-like query language with sub-second response |
| Log Analysis | Built-in charts, dashboards, and anomaly detection |
| Alerting | Trigger alerts based on log query results |
| Data Shipping | Forward logs to MaxCompute, OSS, or AnalyticDB |
SLS supports both keyword search and SQL analytics:
-- Keyword search
error AND status: 500
-- SQL analytics
* | SELECT status, COUNT(*) AS cnt
FROM log
WHERE __time__ > UNIX_TIMESTAMP() - 3600
GROUP BY status
ORDER BY cnt DESC
| Source | Collection Method |
|---|---|
| ECS instances | Logtail agent |
| Kubernetes containers | Logtail DaemonSet |
| Function Compute | Automatic |
| API Gateway | Built-in integration |
| OSS access logs | Enable access logging |
| VPC Flow Logs | Built-in integration |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.