Create CloudWatch Dashboard
We have deployed a single Amazon Linux 2 EC2 instance and we will now create a CloudWatch Dashboard to monitor the memory and CPU resources consumed by the instance.
- From the AWS Console, click the search box and type in CloudWatch (or you can open this link directly https://console.aws.amazon.com/cloudwatch/home)
- Click on Dashboards link on the left side
- Click on Create Dashboard button
If you have not done so already, make sure to click “Try out the new interface” to see the updated CloudWatch interface.
- Under Dashboard Name, type in “LinuxEC2Server” and then click “Create Dashboard”
- You will be presented with dialog box to “Add to the dashboard”. Select Line and click Next
- Select Metrics and click Configure
- Under “All metrics”, scroll down to “Custom Namespaces” and click on “PerfLab”
- You will find multiple metrics, but we will start with each of the CPU’s in the machine.
- Click on “ImageId, InstanceId, InstanceType, cpu”
- Make sure the Instance Name starts with LinuxMachineDeploy, then click on one of the InstanceId and select “Search for this only”. This will ensure we are only looking at instances created for this lab.
- Under Metric Name, look for “cpu_usage_user” and then click “Add to search”. This will limit your choices again to only the CPU metrics for this machine. In this case, you should see 2 processors listed, but if the machine you have deployed has more, you will see them each listed.
- On the left side of the screen, select the box right above the list, this will add both metrics to your graph.
- Click on the “Graphed Metrics (2)” tab, and on the right side next to Period, select “5 seconds”
- The metric graph will now update with more data points. Click “Create Widget”
- You should now see the dashboard we have created displayed with the first metric widget.