CloudWatch Dashboard

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)
  1. 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.
  2. Select All metrics.
  3. Clear the search box then search again by each EBS volume from the previous section.
Name VolumeID Size Volume Type IOPS
reinvent vol-xxxx 500 GiB (arch) gp2 1500
reinvent vol-xxxx 200 GiB (redo) io1 2000
reinvent vol-xxxx 8 GiB (root) gp2 100
  1. Click Graphed metrics tab and update each metric label with volume name (reod, arch, root)
  2. Repeat the previous two step for each volumes.
  3. Unselect all metrics. Change the Statistic to Sum with Period of 1 Minute
  4. Click Math expression and select Start with empty expression.
  5. 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.

SUM([m19,m21,m29,m31,m37,m39])/1024/1024/PERIOD(m19)
  1. Now create time series for EBS throughput for each volume.

SUM([m19,m21])/1024/1024/PERIOD(m19)
SUM([m29,m31])/1024/1024/PERIOD(m19)
SUM([m37,m39])/1024/1024/PERIOD(m19)
  1. You will now create a dashboard. Select all time series then click Actions dropdown and select Add to Dashboard.
  2. Click **Create new** and enter Reinvent-App as the dashboard name.
  3. Select Line for a widget type and enter EBS Throughput as Widget Name
  4. Click Add to dashboard and click Save dashboard
  5. 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
  6. In All metrics tab, click CWAgent and AutoScalingGroupName, ImageId, InstanceId, InstanceType, name
  7. select metric diskio_write, diskioreads for xvda, svdb, and xvdc

SUM([m42,m43,m44,m45,m46,m47])/PERIOD(m42)
SUM([m42,m43])/PERIOD(m42)
SUM([m44,m45])/PERIOD(m44)
SUM([m46,m47])/PERIOD(m46)
  1. Select IOPS time-series and clear others and add them to the dashboard by following the same steps earlier.
  1. (Homework) Now add time series for Network Throughput, Instance store througput and IOPS. These metric are instance's metric.