Written by: AWS Community Builder Wang Sheng Hau
這邊針對 Cloud Watch 不知道該怎麼設定監控指標做了一個簡易的 Demo 說明給客戶看
也因此把他更新上來紀錄一下,給有需要的朋友參考使用
1. 登入 AWS CloudWatch 的Console 畫面
2. 點選左邊 , 所有指標
3. 點選 EC2 指標 , 點選想監控之 EC2
4. 可選用預設的指標 , 如 CPU Disk I/O Network I/O 等等
5. 點選 圖表化指標選項 可以設定 統計值 統計時間的頻率
6. 點選 Query 可以自定義值
7. 透過設定的儀表板可以看到EC2監控的指標
8. CloudWatch Metrics 說明
Instance Metrics
• CPUUtilization: This metric tracks the cpu utilization of the underlying EC2
instance as a percentage of its allocated EC2 compute units. In other words,
it tracks, as a percentage, the amount of allocated EC2 compute units that
are currently in use on the instance.
• DiskReadOps: This metric tracks the number of completed read operations
from all instance store volumes available to the instance in a specified period
of time.
• DiskWriteOps: This metric tracks the number of completed write operations
to all instance store volumes available to the underlying instance in a
specified period of time. If there are no instance store volumes attributed to
this instance, either the value is 0 or the metric is not reported.
• DiskReadBytes: This tracks the amount of data, in bytes, read from all
instance store volumes available to the instance over a period of 5 minutes
for the basic monitoring and 1 minute for detailed monitoring. This metric is
used to determine the volume of the data the application reads from the hard
disk of the instance and can be used to determine the speed of the
application. If there are no instance store volumes for this instance, either
the value is 0 or the metric is not reported.
• DiskWriteBytes: This metric records the amount, in bytes written, to all
instance store volumes available to the instance over a period of 5 minutes
for the basic monitoring and 1 minute for detailed monitoring. It tracks how
fast the application writes data to its underlying disk, and thus can be used
to infer the speed of the application. If there are no instance store volumes
for this instance, either the value is 0 or the metric is not reported.
• NetworkIn and NetworkOut: These metrics track the amount of bytes
transferred on all network interfaces by the instance, with the former
(NetworkIn) recording the amount of bytes received and the latter
(NetworkOut) recording the amount of bytes sent out. These trackings are
done with respect to the recording period, that is, these metrics record the
amount of bytes transferred in a 5 minute period for the basic monitoring,
and 1 minute period the detailed monitoring.
• NetworkPacketsIn and NetworkPacketsOut: These metrics track the number
of packets received (NetworkPacketsIn) and sent out (NetworkPacketsOut)
on all network interfaces by the instance. They identify the volume of
incoming and outgoing traffic in terms of the number of packets on a single
instance. These metrics are available for basic monitoring only.
• MetadataNoToken: This metric tracks the number of times the instance
metadata service was successfully accessed using a method that does not
use a token. It is used to determine if there are any processes using
Instance Metadata Service Version 1 to access instance metadata (Instance
Metadata Service Version 1 does not use a token). If all requests use tokenbacked
sessions, i.e., Instance Metadata Service Version 2, the value is 0.
CPU Credit Metrics
• CPUCreditUsage: This metric tracks the number of CPU credits consumed
by the instance for CPU utilization over a period of 5 minutes. One CPU
credit is equivalent to one vCPU running at 100% capacity for one minute or
an equivalent combination of vCPUs, time, and capacity (for example, one
vCPU running at 50% capacity for two minutes or two vCPUs running at
25% capacity for two minutes).
• CPUCreditBalance: This tracks the number of earned CPU credits that an
instance has accrued since it was launched or started. In other words, it
tracks the number of CPU credits available to an instance ( total credits
amassed over time minus the total credits the instance has used in previous
bursts).
• CPUSurplusCreditBalance: This tracks the number of surplus credits that
have been spent by an unlimited instance ( an unlimited instance is a
burstable instance that has been configured to run in unlimited mode, that is,
it can sustain performance bursts whenever and however long it requires)
when its CPUCreditBalance value is zero. Surpluses are paid back by
earned CPU credits, but if this surplus goes over the maximum cpu credit
this instance can earn in a 24 hour period, you may incur an additional
charge.
• CPUSurplusCreditsCharged: This tracks the number of spent surplus credits
that are not paid back by earned CPU credits, and which thus incur an
additional charge.
Amazon EC2 Usage Metrics
• Service: This refers to the name of the AWS service containing the resource
being tracked. In this case, the service name is EC2.
• Type: This specifies the type of entity that is being tracked, in this case, a
Resource.
• Resource: This specifies the type of resource being tracked, and the only
valid value for EC2 usage metrics is vCPU.
• Class: This specifies the class of the resource being tracked. For EC2
instances, the valid values
are Standard/OnDemand, F/OnDemand, G/OnDemand, Inf/OnDemand, P/O
nDemand, and X/OnDemand.