Install CloudWatch Agent Bucket
Install CloudWatch Agent
-
Open EC2 Dashboard
-
In the left navigation bar, select Instances then select the EC2 virtual machine created in the previous step.
- Use browser-based SSH connection tool to connect to EC2 virtual machine
- Download package Amazon CloudWatch Agent
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip
- Unzip and install the downloaded Amazon CloudWatch package
unzip AmazonCloudWatchAgent.zip
sudo ./install.sh
- Configure AmazonCloudWatchAgent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
Configure with options as shown below:
- Start CloudWatch Agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json - S
- Wait about 5 minutes for the stats to become available. Then go back to the Amazon CloudWatch console, select Metrics and select CWAgent
- Select ImageID, InstanceID, Instance Type
- Select EC2 virtual machine
Now that the CloudWatch agent has been successfully installed, Amazon CloudWatch can monitor the memory usage of the map instance on Amazon CloudWatch