‫Welcome to this section on Cloud Monitoring.
‫In this section, we're going to know how we can
‫get a better idea and a better picture
‫of the performance of our cloud deployments.
‫So the first service I want to talk about
‫is CloudWatch Metrics.
‫CloudWatch provides metrics for every service in AWS,
‫and a Metric is a variable to monitor.
‫For example, the CPUUtilization or the NetworkIn.
‫The metrics are going through the time,
‫so they will have timestamps,
‫and if you want to visualize all your metrics at once,
‫you can create a CloudWatch dashboard of metrics.
‫So here is an example of a very common metric
‫for CloudWatch which is called the Billing metric.
‫So this metric is only available in us-east-I,
‫so only in one region, and it represents the total amounts
‫you have spent on your AWS cloud.
‫So obviously, at every month end it will reset back
‫in to zero, but as you can see,
‫over time that metric goes up and then will go back to zero,
‫and so this month I have spent more than $100
‫because I am experimenting with different AWS services.
‫So this is one metric, but obviously,
‫there are a ton more metrics we can look at.
‫For example, for our EC2 instances,
‫we can look at the CPU Utilization,
‫which is how much we are making the CPU work
‫and if it makes it work a lot,
‫than maybe our instance is too busy
‫and we need to scale it up or scale it out.
‫The Status Check to make sure that our EC2 instance
‫is properly functioning, and the Network,
‫to see how much network is going in our instance
‫and out our instance.
‫As you can see, the RAM is not an available metric
‫for your EC2 instances.
‫These metrics you get every five minutes by default,
‫but you can enable a Detailed Monitoring,
‫which is more expensive,
‫to get these metrics every one minute.
‫Then you have EBS volumes,
‫which are where you store your data,
‫and you get information about the amount
‫of disk read and writes that are happening.
‫Then for your S3 buckets, you can get some information
‫around the bucket size and bytes, the number of objects,
‫or the number of requests done into your S3 buckets,
‫and the Billing metric that just shows you,
‫shows you the total estimated charge
‫for your account only in us-east-I,
‫but it's for your entire account.
‫Then the Service Limits, which is how much you have been
‫using a service API, or finally,
‫if you don't find the metric you like,
‫you can push your own custom metrics.
‫Next lets talk about CloudWatch Alarms.
‫So Alarms are used to trigger notifications for any metric,
‫and that means that once a metric goes above a threshold,
‫then we can have a CloudWatch Alarm action,
‫and these actions can be for an auto scaling group
‫to increase or decrease the number
‫of EC2 instances desired counts
‫effectively allowing your auto scaling group
‫to scale automatically.
‫EC2 Actions, if you want to stop, terminate, reboot,
‫or recover an EC2 instance,
‫and SNS notifications if you wanted to send a notification
‫into an SNS topic.
‫For example, you're saying, okay,
‫if my EC2 instance has a utilization
‫of over 90%, then send us an email
‫because we want to look at it and something's wrong.
‫Then you get various options for creating the alarm,
‫sampling, percentage, max, min, et cetera,
‫and you can which, you can choose the period on which
‫to evaluate an alarm, whether it be five minutes,
‫ten minutes, an hour, and then finally,
‫you can create what's called a billing alarm
‫on the CloudWatch Billing metric,
‫which allows you to get notified if your metric goes over,
‫for example, 10 or $20.
‫The alarm state can be OK when everything is green,
‫INSUFFICIENT_DATA when there's not enough data points
‫to figure out if it should be green or bad,
‫and then ALARM when it's bad.
‫Okay, so that's it for the overview,
‫now we'll see you in the next lecture
‫to practice using metrics and alarms.