AWS CloudWatch



1. )Amazon Cloud Watch - is monitoring service to monitor your AWS resources, as well as the application that you run on AWS.



CloudWatch can monitor things like:

a) Compute

-Autoscaling Groups
-Elastic Load Balancers
-Route53 Health Checks

b) Storage & Content Delivery

-EBS Volumes
-Storage Gateways
-CloudFront

c) Databases & Analytics

-DynamoDB
-Elasticache Nodes
-RDS Instances
-Elastic MapReduce Job Flows
-Redshift

d) Other

-SNS Topics
-SQS Queues
-Opsworks
-CloudWatch Logs
-Estimated Charges on your AWS Bill




Host Level Metrics Consist of:
-CPU
  *CPUUtilization
-Network
 *NetworkIn
 *NetworkOut
 *NetworkPacketsIn
 *NetworkPacketsOut
-Disk
 *DiskReadOps
 *DiskWriteOps
 *DiskReadBytes
 *DiskWriteBytes
-Status Check
 *StatusCheckFailed
 *StatusCheckFailed_Instance
 *StatusCheckFailed_System


Tip:
-RAM Utilization is a custom metric.
-By default EC2 monitoring is 5 min intervals, unless you enable detailed monitoring which will then make it 1 min intervals.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ec2-metricscollected.html



How Long are CloudWatch Metrics Stored?

You can retrieve data using the GetMetricStatistics API or by using third party tools offered by AWS partners.

1 min datapoints are available for 15 days
5 min datapoints are available for 63 days
1 h datapoints are available for 455 days

You can retrieve data from any terminated EC2 or ELB instance after its termination.


Metric Granularity

It depends on the AWS service. Many default metrics for many default services are 1 min, but it can be 3 or 5 min depending on the service.

Tip: Exam custom metrics the minimum granularity that you can have is 1 min.



CloudWatch Alarms

You can create an alarm to monitor any Amazon CloudWatch metric in your account. This can include EC2 CPU Utilization, Elastic Load Balancer Latency or even the charges on your AWS bill. You can set the appropriate thresholds in which to trigger the alarms and also set what actions should be taken if any alarm state is reached. This will be covered in a subsequent lecture.



Labs:

a) Monitoring Memory and Disk Metrics for Amazon EC2 Linux Instances:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html
 -> how to put RAM logs from EC2 to CloudWatch



CloudWatch Dashborad

CloudWatch Logs

Cloud Watch Logs with ElasticSearch
"start striming vpc flow logs to elasticsearch"
it is using AWS Lambda

Metrics Filters






Komentarze

Popularne posty z tego bloga

Kubernetes

Helm

Ansible Tower / AWX