CloudWatch - seanremenyi/Notes_aws_developer GitHub Wiki
Amazon cloudwatch is a monitoring service to monitor the health and performance of your AWS resources, as well as the applications that you run on AWS and in your own datacenter What can it monitor: Compute:
Ec2 instances Auto scaling grous Elastic Load balancers Route53 health checks Lambda Storage and content delivery: EBS volumes Storage Gateway Cloudfront Databases and analytics: Dynamodb tables Elasticache nodes RDS instances Redshift Elastic Map Reduce Other: SNS topics SQS queues API GAteway Estimated AWS charges A cloudwatch agent - define your own metrics CloudWatch Logs allows you to monitor operating system and application logs. All ec2 instances send key health and performance metrics to CloudWatch. Defualt host-level metrics consist of : CPU, network, disk and status check Metrics are stored indefinitely You can retrieve data from any EC2 or Elastic Load Balancer instance even after it has been terminated Operating system-level metrics:
By deafault ec2 does not send operating system-level metrics to Cloudwatch Cloudwatch Agent: by installing the cloudwatch agent on your ec2 instances, you can collect operating system metrics and send them to cloudwatch Operating system Metrics: Memory usage, processes running on your instance, amount of free disk space, CPU idle time, etc. Metric frequency: by default ec2 sends metric date to cloudwatch in 5-minute intervals. For an additional charge you can enable detailed monitoring that sends metrics at 1-minute intervals. For custom metics, the default is 1-minute intervals, and you can configure high resolution metrics that are sent at 1 second interval.
Monitoring system and application logs: Monitor log files: Monitor and troubleshoot your applications using existing system and application log files Customize for your application: Monitor your logs in near-real time for specific phrases, values or patterns. Requires the Cloudwatch agent Use Cases: Track the number of errors that occur in your application log and send yourself a notification whenever the rate of errors exceeds a threshold you specify.
Alarms: you can create an alarm to monitor any Amazon CloudWatch metric in your account Alarms: This can include EC2 utiliztion, ELB latency or even the charges on your AWS bill Thresholds: You can set appropriate thresholds to trigger the alarms and actions to be taken if an alarm state is reached Use Cases: You can set an alarm that sends you a notification or executes an Auto-scaling policy if CPU utilization exceeds 90% on your EC2 instance for more than 5 minutes