what is AWS CLOUD WATCH(PART 1)
AWS cloudwatch is a monitoring service but now has expanded more than that, it's also a logging solution. There are amazing features that AWS cloudwatch provides. Primarily it's a service that will be monitoring performance of your AWS environment.
Primarily, it is a service that monitors the performance of your AWS environment. Within a specific region, it automatically generates standard metrics for any service you use. In other monitoring tools, these metrics are commonly referred to as checks, such as CPU usage, disk utilization, or network performance for a virtual machine.
So, for every service cloudwatch is going to provide some standard metrics, you really don't need to set up monitoring service. Monitoring is anyways set up through Cloud Watch. If you want you can make changes by adding more metrics of your choice, which are called CUSTOM metrics. On those metrics, you can set alarms notifications. Metrics is the primary thing in the cloud watch. If you use EBS volume, you would see some metrics for EBS volume. If you're using EC2, you should see some metrics same goes with Cloudfront, Route53 Healthchecks, RDS, Amazon S3 etc.
EC2 cloudwatch
If you're using an ec2 instance it will have a monitoring tab. All these metrics are coming from cloud watch. In the image above, you have CPU utilization(metric) currently there is no data available because it's going to take some time to collect this data. I have recently just launched an HTML website(downloaded from Tooplate.com) hosting on NGINC webserver in an EC2 Instance, so it's going to take some time to collect the metrics and then you should see the graphs.
So CPU utilization, Status checks, Network in, Network Out. Network packets in .Network packets out, Disk read, Disk Operations, Disk write and Disk write Operations are the common metrics that you will see in all the ec2 instances.
EBS cloudwatch
Likewise, if you go to volume section. If you see your volumes, volume will also have monitoring and will there be metrics for volumes as well; Read bandwidth, Write bandwidth, Read throughput, Write throughput etc.
So you take any service that you're using in your AWS account, it will have metrics which will be set by Cloud Watch.
Apart from metrics, Cloudwatch also has EVENTS. AWS events will give you a real time stream of any events that is happening. For example, you launching an instance or Terminating or taking a snapshot or creating a volume. These are all events and cloud watch are going to capture all the events. What can you do with those events? Well, you can set triggers from these events.
The next thing that Cloud Watch does is LOGS. Almost all the services will have an option to stream the logs. From your operating system,
you can set an agent which can stream logs to cloud watch service.
For now let's focus on METRICS. What do we do with the metrics, well, we set alarms on them. If one really want to monitor activity, you cant be 24hours by 7 days looking at the graphs of cloud watch
but if something goes wrong, like the graph is spiking high, you would get some notifications. So alarms will help set your notifications it can be integrated with SNS service to send email notification.
For example, if we the CPU utilization is crossing above 60. I should receive an email notification depending on my settings.
There are three services in play over here.
Ec2 instance that is generating the metrics, Cloudwatch which is collecting the metrics, You or cloud watch which is also setting up alarms in the cloud watch and then the SNS service.
In the next article, we'll be going all hands on; we will be seeing also how to how to collect logs from the ec2 instance and set metrics on the logs. And then based on that, you can send email notification or you can do some other stuff as well.
Top comments (0)