Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS.
CloudWatch vs CloudTrail:
Used to collect and track metrics, collect and monitor log files, and set alarms.
Automatically react to changes in your AWS resources.
With CloudWatch you can monitor resources such as:
- EC2 instances.
- DynamoDB tables.
- RDS DB instances.
- Custom metrics generated by applications and services.
- Any log files generated by your applications.
Gain system-wide visibility into resource utilization.
Monitor application performance.
Monitor operational health.
CloudWatch is accessed via API, command-line interface, AWS SDKs, and the AWS Management Console.
CloudWatch integrates with IAM.
- Amazon CloudWatch Logs lets you monitor and troubleshoot your systems and applications using your existing system, application and custom log files.
- You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, Route 53, and other sources.
- CloudWatch Logs can be used for real time application and system monitoring as well as long term log retention.
- CloudWatch Logs keeps logs indefinitely by default.
- CloudTrail logs can be sent to CloudWatch Logs for real-time monitoring.
- CloudWatch Logs metric filters can evaluate CloudTrail logs for specific terms, phrases or values.
CloudWatch retains metric data as follows:
- Data points with a period of less than 60 seconds are available for 3 hours. These data points are high-resolution custom metrics.
- Data points with a period of 60 seconds (1 minute) are available for 15 days.
- Data points with a period of 300 seconds (5 minute) are available for 63 days.
- Data points with a period of 3600 seconds (1 hour) are available for 455 days (15 months).