Amazon CloudWatch
Amazon Cloud Watch is AWS cloud service that you can use for monitoring your AWS resources and application in real time. Cloud Watch helps you to collect data and gives you graphical presentation called metrics.
Create an alarm which can send notifications and you can configure it to take certain action on the AWS resources based on the policies or rules you defined in Cloud Watch as well.
- For instance, if you choose to monitor the CPU usage for your EC2 instance in your production environment and you decided to add or remove the EC2 instances in application tier, you can perform this using Cloud Watch.
It has provision to modify different parameters for metrics over a time period and configure alarms and also specify the actions if threshold is reached.
Cloud Watch can perform multiple actions like sending notification to Amazon SNS service and executing Auto Scaling policy or triggering Lambda function.
Amazon offers either Basic or Detailed monitoring for AWS resources as well.
- Basic Monitoring – Sends data collections to Cloud Watch for every 5 minutes for finite number of metrics and it is free and by default it is enabled.
- Detailed Monitoring – Sends data collection to Cloud Watch for every minute for any metrics and data aggregation for additional charges. You need to enable it.
AWS Cloud Watch supports monitoring and metrics for below AWS services.
For detailed monitoring, you have ability to aggregate metrics across a length of time you specify. Amazon Cloud Watch can only aggregate data within multiple availability zone but doesn’t across the regions. Amazon Cloud Watch has functionality of creating custom metrics to monitor AWS resources and event where AWS doesn’t have visibility such as any application specific event or threshold that are not know of AWS.
AWS Cloud Watch supports API integration that permits programs or scripts to PUT metrics as name-value key pairs and can be used as event and trigger alarms. Amazon Cloud Watch can get access logs from EC2 and other resources and store them then you can access it in real time for monitoring purpose.
AWS Cloud Watch can also used for store the log files to Amazon S3 or Glacier. Amazon Log Agent used for sending the resource’s log data to Cloud Watch logs automatically. You need to install Log agent on Amazon resources such as EC2 and configure it and start it.
Amazon Cloud Watch Limitations
- Up to 5000 alarms per AWS account is allowed.
- Matric data is retained for only 2 weeks by default.
- If you want to store it for longer, you will need persistent storage like S3 or Glacier.
For more detailed limitations please refer Documentation.