Create cloud watch for monitoring EC2 RAM - amazon-web-services

I always wonder why amazon has not provided cloud watch to monitor EC2 RAM , if they are able to do it for CPU? I understand that Amazon does not have visibility into the guest O/s, whatever is visible to hypervisor, only that could be monitored. Isn't CPU utilization also a part of guest O/S which is invisible to xen hypervisor? Then why is it that only RAM monitoring is excluded?
I think my understanding isn't clear here, could someone help?

It's possible to monitor EC2 RAM with CloudWatch.
This link shows how: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts.html

Related

How to I can know performance indicators on the AWS instance?

How to I can know, for example, RAM size on the AWS instance?
I select View details on the needed instance, but I can't find any needed information about the productivity (CPU speed, Storage size, RAM):
CPU usage for your instance is reported in CloudWatch by default. The RAM and disk volume usage is only known by the operating system running on the instance, so you have to either login to the instance to check that, or you can install the AWS CloudWatch Agent on the instance to have those values reported to CloudWatch.

GCP VM stopped responding

We have a VM server on GCP. Yesterday, the server stopped responding, we could not even SSH into the server, but everything was ok after restarting the server. I am having a look at the metrics and this is what I have noticed:
There is no Memory Utilization data for that period. Before this, the Memory Utilization was 90%.
Read Through Put is quite high; 13 MiB/s
What could have gone wrong? What else should I consider looking at?
Harith:
The applications processes running in your VM consumed the totality of the memory assigned to the VM.
Analyze each application hosted on the VM and evaluate its MTRs (Minimal Technical Requirements) and the actual work load that each one represent, this in order to estimate if the memory amount assigned is enough to support that load.
Consult log entries if available on those applications to see if they can reveal the consumption level just after the unresponsive condition.
Consider changing the machine type if you have to increase any resource capcity assigned to your vm.
If the resource consumption of your applications running on your VM will be very variable, you will need consider the implementation of autoscaling groups of instances.

How to fix ec2 instance when I can't login via ssh after installing clamscan/clamav?

After installing clamscan clamav on ubuntu 18.04 aws ec2 instance I can't login to my aws server with ssh. Neither my website on that server shows up on browser. I have rebooted but not working. How do I fix this?
Common reasons for instances are Exhausted memory and Corrupted file system.
Since you are using t2.micro, which only has 1GB of ram, and by default 8GB disk, its possible that your instance is simply too small to run your workloads. In such a situation, a common solution is to upgrade it to, e.g. t2.medium (2GB of RAM), but such change will be outside of free-tier.
Alterantively, you can re-reinstall your application on new t2.micro, but this time setup CloudWatch Agent to monitor RAM and disk use. By default these things are not monitored. If you monitor them on a new instance, it can give your insights about how much ram, disk or other resources, are used by your applications.
The metrics collected in CloudWatch will help you judge better of what causing the freeze of your instance.

How to find cause of EC2 micro instance regular read/write surge?

I'm using a micro istance on amazon ec2 and today i received an email from amazon that my i/o usage for ebs disk is over the free tier usage so he charge me for 0.20$.
Cloudwatch say this:
http://awesomescreenshot.com/0c91rrs95e
What happened at 6:50 and how can i know which process give this problem?
Looks like at 06:40 you had 4gb read from the volume.
From the screenshot I can't tell why this happened. Could this be a backup or download of large file?
You don't state what your system is doing, or what uses it so we can only guess. If you could give more information we might be able to help.
All the best,
Will

How does the Amazon CloudWatch work?

Suppose I have an EC2 instance, which I understood is a VM instance. So if I enable CloudWatch for this EC2 instance, should this monitoring capabilitiy offered by CloudWatch added into my EC2 instance, or it is just running in the hypervisor like XEN?
Thanks.
CloudWatch monitoring is always enabled by default for every EC2 instance at 5-min granularity. What you can enable is detailed monitoring which means you get 1-min observation granularity and aggregate metrics. Default monitoring at 5-min level is free, but detailed monitoring costs money.
Out-of-the-box CloudWatch metrics are measured at hypervisor level and you do not need to do anything to turn them on. See more info on what metrics are available here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html
Things like memory utilization and disk space can't be measured at hypervisor level so CloudWatch distributes a simple package with scripts that can be installed on the instance (Linux or Windows.) Those scripts report the data as custom metrics which also costs money. See http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts.html
It is monitored at the hypervisor layer. Aamazon generally will not look into the instance at VM layer so they can't monitor some feature such as memroy usage at the VM.