Monitoring and storing logs

Get Started with CloudWatch Logs

To start monitoring logs with CloudWatch Logs, you need to first install and configure the CloudWatch Logs Agent to send your logs to CloudWatch. The Agent can be installed directly on a new or running EC2 instance as well as through CloudFormation or Chef. Follow the instructions here to install and configure.

You can monitor log events as they are sent to CloudWatch Logs by creating Metric Filters. Metric Filters turn log data into CloudWatch Metrics for graphing or creating alarms.

Learn how to create Metric Filters in the Console or CLI in the Amazon CloudWatch Developer Guide.

Monitoring Amazon EC2 instances

If you are signed up for Amazon EC2, you are automatically registered for Amazon CloudWatch and EC2 instances are automatically enabled for Basic Monitoring at no additional charge.

To enable Detailed Monitoring when launching a new EC2 instance, click the “Enable CloudWatch detailed monitoring” checkbox on "Step 3: Configure Instance Details". You can also enable Detailed Monitoring for an existing instance by right-clicking the instance in the Amazon EC2 console and selecting “Enable Detailed Monitoring.”

Monitoring other AWS resources

Amazon CloudWatch automatically monitors Elastic Load Balancers for metrics such as request count and latency; Amazon EBS volumes for metrics such as read/write latency; Amazon RDS DB instances for metrics such as freeable memory and available storage space; Amazon SQS queues for metrics such as number of messages sent and received; and Amazon SNS topics for metrics such as number of messages published and delivered.

For more details about metrics for other AWS resource, please see the Amazon CloudWatch Developer Guide.

Monitoring your own custom metrics

Get Started with Custom Metrics

Amazon CloudWatch can also monitor metrics that are generated by the applications you run on AWS resources. You can immediately send and store any metrics that are important to your business performance or your application’s operational performance using a simple API call. For example, you can have your application send web page load times via the API to be monitored in CloudWatch as a custom metric. You can submit as much or as little custom metric data as you need. All the same Amazon CloudWatch functionality will be available at up to one-minute frequency for your own custom metric data, including graphs, statistics, and alarms.

For more details about supplying your own custom metrics, please see the Amazon CloudWatch Developer Guide.

Accessing your Amazon CloudWatch metrics

To start accessing your Amazon CloudWatch metrics, click the Metrics link on the Amazon CloudWatch tab of the AWS Management Console. All your AWS resource metrics and your own custom metrics will be listed. Find and select a metric of interest and an interactive graph for that metric will be displayed. Select a time range and choose to display values for Average, Minimum, Maximum, Sum, or number of Samples. Select additional metrics to add them to the graph in order to correlate behavior or discover patterns. Click the Create Alarm button to initiate automatic notifications or Auto Scaling actions when the metric reaches a threshold you set. Click the Dashboard link to view status overviews for all your alarms and AWS resource metrics.

For more information on viewing, graphing, and publishing Metrics, please see the Amazon CloudWatch Developer Guide.

Creating Amazon CloudWatch Alarms

To create your Amazon CloudWatch alarms, click the Alarms link on the Amazon CloudWatch tab of the AWS Management Console. All your CloudWatch alarms will be listed. Next, click the Create Alarm button and select the metric of interest. Finally, define the Alarm threshold and action to take when the alarm changes state.

For more details on creating Alarms, please see the Amazon CloudWatch Developer Guide.

Creating rules for Amazon CloudWatch Events

To start using CloudWatch Events to react to changes in your AWS resources, click the Rules link, under Events on the Amazon CloudWatch tab of the AWS Management Console. Next, click the Create Rule button and select your event source and target. Click on Configure Details, give your rule a name, and click on Create Rule.

For more details on Rules and CloudWatch Events, please see the Amazon CloudWatch Documentation.

Discover more Amazon CloudWatch Resources

Visit the resources page
Ready to build?
Get started with Amazon CloudWatch
Have more questions?
Contact us