“If you can’t measure it, you can’t improve it.” — Monitoring là mắt và tai của hệ thống production. AWS CloudWatch là dịch vụ giám sát trung tâm, và hiểu đúng thuật ngữ tiếng Anh sẽ giúp bạn setup alerting, đọc logs, và debug incident nhanh hơn nhiều.
📚 Bảng Từ Vựng
🔹 Metrics & Alarms
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| metric | /ˈmetrɪk/ | chỉ số (dữ liệu đo lường) | The CPU utilization metric shows the instance is running at 85% capacity. |
| alarm | /əˈlɑːrm/ | cảnh báo (trigger khi metric vượt ngưỡng) | Set an alarm to notify the team when API latency exceeds 500ms. |
| composite alarm | /kəmˈpɑːzɪt əˈlɑːrm/ | cảnh báo tổng hợp (kết hợp nhiều alarm) | The composite alarm only fires when both CPU and memory alarms are in ALARM state. |
| anomaly detection | /əˈnɑːməli dɪˈtekʃən/ | phát hiện bất thường (dựa trên ML) | Enable anomaly detection on the request count metric to catch unusual traffic patterns. |
| dashboard | /ˈdæʃbɔːrd/ | bảng điều khiển (hiển thị metrics trực quan) | We created a CloudWatch dashboard showing real-time metrics for all microservices. |
🔹 Logs
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| log group | /lɔːɡ ɡruːp/ | nhóm log (tập hợp log streams) | Each Lambda function writes to its own log group in CloudWatch. |
| log stream | /lɔːɡ striːm/ | luồng log (chuỗi sự kiện từ một nguồn) | Each container instance creates a separate log stream within the log group. |
| retention | /rɪˈtenʃən/ | thời gian lưu trữ | Set the log retention to 30 days to keep costs under control. |
| insight | /ˈɪnsaɪt/ | truy vấn log nâng cao (CloudWatch Logs Insights) | Use Insights to query error patterns across millions of log events in seconds. |
🔹 Filters & Subscriptions
| English | IPA | Tiếng Việt | Example |
|---|---|---|---|
| metric filter | /ˈmetrɪk ˈfɪltər/ | bộ lọc chỉ số (tạo metric từ log) | Create a metric filter to count the number of “ERROR” messages in the application logs. |
| subscription filter | /səbˈskrɪpʃən ˈfɪltər/ | bộ lọc đăng ký (stream log đến nơi khác) | The subscription filter forwards all error logs to the centralized logging platform via Kinesis. |
💡 Mẹo Ghi Nhớ
- Metric → Alarm → Action: Đây là flow cơ bản — metric đo, alarm canh, action phản ứng (gửi SNS, scale, v.v.).
- Log Group vs Log Stream: Nghĩ như folder và file — log group là folder, mỗi log stream là một file bên trong.
- Metric Filter = “biến log thành số”: Bạn có hàng triệu dòng log, metric filter đếm pattern cụ thể và biến thành metric để alarm theo dõi.
📝 Bài Tập
Điền từ thích hợp vào chỗ trống:
- Set an ___ to notify the on-call engineer when error rate exceeds 5%.
- Each Lambda function writes logs to its own ___ ___ in CloudWatch.
- Set the log ___ to 30 days to avoid unnecessary storage costs.
- Create a ___ ___ to count the number of timeout errors in the application logs.
- The CloudWatch ___ shows real-time CPU, memory, and latency across all services.
✅ Đáp án
- alarm — Alarm trigger khi metric vượt ngưỡng đã set
- log group — Mỗi Lambda function có log group riêng
- retention — Thời gian lưu giữ log, ảnh hưởng trực tiếp đến chi phí
- metric filter — Tạo custom metric từ log pattern
- dashboard — Bảng điều khiển trực quan cho monitoring
Tổng Kết
Monitoring không phải “nice-to-have” — nó là must-have cho bất kỳ hệ thống production nào. 11 thuật ngữ CloudWatch trên sẽ giúp bạn setup observability stack, debug incident, và communicate hiệu quả khi on-call. Remember: “No metrics, no alerts, no sleep” 📊🔔