In this step, you will create a CloudWatch dashboard that display various performance metrics for your instances. You will also show the error rate and create alarm when it reaches the threshold.
Total throughput (MiB/s) = ( Sum(TotalIOBytes) ÷ 1024 ÷ 1024 (to convert to MiB) ) ÷ seconds in the period
Total IOPS = (ReadOps + WriteOps) ÷ seconds in the period
Total Network througput (MiB/s) = ( Sum(Network In + Network Out) ÷ 1024 ÷ 1024 (to convert to MiB) ) ÷ seconds in the period
Fault rate = (Sum(500 Error) x 100) ÷ Sum(Requests)
- Go to CloudWatch Console and click Metrics from the left menu. Search for the Instance ID from the previous step. Click EC2 > Per Instance Metric.
- Select All metrics.
- Clear the search box then search again by each EBS volume from the previous section.
||500 GiB (arch)
||200 GiB (redo)
||8 GiB (root)
- Click Graphed metrics tab and update each metric label with volume name (reod, arch, root)
- Repeat the previous two step for each volumes.
- Unselect all metrics. Change the Statistic to Sum with Period of 1 Minute
- Click Math expression and select Start with empty expression.
- Let's create a time series for instance EBS throughput which sum of DiskReadBytes and DiskReadBytes of all EBS volume over a period of time. Under Label, type the name of the time series as Instance EBS Throughput and type the formular. Replace m* with your metric Id.
- Now create time series for EBS throughput for each volume.
- You will now create a dashboard. Select all time series then click Actions dropdown and select Add to Dashboard.
- Click **Create new** and enter Reinvent-App as the dashboard name.
- Select Line for a widget type and enter EBS Throughput as Widget Name
- Click Add to dashboard and click Save dashboard
- Let's create the time series for IOPS. You will use the metrics from CloudWatch agent which report disk performance for within the OS. You can view the CloudWatch metric configuration here
- In All metrics tab, click CWAgent and AutoScalingGroupName, ImageId, InstanceId, InstanceType, name
- select metric diskio_write, diskioreads for xvda, svdb, and xvdc
- Select IOPS time-series and clear others and add them to the dashboard by following the same steps earlier.
- (Homework) Now add time series for Network Throughput, Instance store througput and IOPS. These metric are instance's metric.