服务 · 管理与监管
Amazon CloudWatch
Monitors your AWS resources and applications with metrics, logs, dashboards and alarms.
本课尚未翻译,暂以英文显示。
- 1Amazon EC2 sends metrics such as CPU use to CloudWatch.
- 2An alarm compares the metric with the threshold you set.
- 3When the threshold is crossed, the alarm sends a notification through Amazon SNS.
- 4It can also tell Auto Scaling to add instances.
分步说明
- 1Amazon EC2 sends metrics such as CPU use to CloudWatch.
- 2An alarm compares the metric with the threshold you set.
- 3When the threshold is crossed, the alarm sends a notification through Amazon SNS.
- 4It can also tell Auto Scaling to add instances.
Metrics and logs flow into CloudWatch. An alarm on a metric notifies the team and adds capacity.
Metrics
Numbers over time, such as CPU use or request counts. Many AWS services send them automatically.
Alarms
Watch one metric against a threshold, then notify people or take an action.
Dashboards
Graphs of metrics and logs in one view, for one account or many.
Logs
Log files from services, servers and applications, kept in log groups that you can search.
是什么
Amazon CloudWatch is the monitoring service of AWS. Many AWS services send it metrics automatically, such as the CPU use of an Amazon Elastic Compute Cloud (Amazon EC2) instance. You can graph metrics on dashboards, and set alarms that act when a metric crosses a threshold you choose, for example by sending a message through Amazon Simple Notification Service (Amazon SNS).
CloudWatch Logs collects log files from AWS services, servers and applications in one place, so you can search them and alarm on what they contain. Data from inside an operating system, such as memory use, comes from the CloudWatch agent, which you install on the server.
是什么
Governance means setting rules for how your AWS accounts are used, then checking that the rules are followed. In governance, CloudWatch does the monitoring: it shows how resources perform and whether something is wrong right now. It does not record who made a change. That is the job of AWS CloudTrail.
要记住
- Metrics are numbers measured over time. Many AWS services send basic metrics at no charge.
- An alarm watches a metric. When the metric crosses the threshold, the alarm can notify people through Amazon SNS, stop or reboot an instance, or add instances with Auto Scaling.
- Dashboards show metrics and logs together, even across accounts and Regions.
要记住
- CloudWatch Logs keeps log data forever unless you set a retention period.
- Memory and disk space use inside an instance need the CloudWatch agent.
- CloudWatch watches performance. CloudTrail records actions. AWS Config records settings.
考试中
- “Send an alert when CPU use stays above 80%” points to a CloudWatch alarm with an Amazon SNS notification.
- “Collect and search application logs in one place” is CloudWatch Logs. “Record which user made an API call” is AWS CloudTrail.
- “Find out whether an AWS outage or maintenance affects your resources” points to the AWS Health Dashboard, not CloudWatch.
别和这些弄混
AWS CloudTrailRecords the actions taken in your AWS account: who did what, when and from where.
AWS X-RayTraces each request as it travels through an application, to show where it slows down or fails.
AWS Health DashboardShows AWS events that may affect your account and resources, such as outages, maintenance and end-of-support dates.