Enabling Amazon CloudWatch on a New Amazon EC2 Instance
This section describes how to enable monitoring when running a new instance.
Command Line Tools
To launch an instance
-
Use the
ec2-run-instances
command.PROMPT>
ami-235fba4a
-k gsg-keypair --monitoringAmazon EC2 returns output similar to the following example.
RESERVATION r-7430c31d 924417782495 default INSTANCE i-ae0bf0c7 ami-2bb65342 pending gsg-keypair 0 m1.small 2008-03-21T16:19:25+0000 us-east-1a monitoring-enabled
-
Verify that monitoring is enabled for the instance. The instance starts running in a few minutes.
-
The following command displays the launch status of the instance.
PROMPT>
i-ae0bf0c7
RESERVATION r-7430c31d 924417782495 default INSTANCE i-ae0bf0c7 ami-2bb65342 ec2-67-202-7-236.compute-1.amazonaws.com ip-10-251-31-162.ec2.internal running gsg-keypair 0 m1.small 2008-03-21T16:19:25+0000us-east-1a monitoring-enabled
Important | |
---|---|
After launching an instance, you are billed hourly for running time. When you are finished, make sure to terminate any instances that you started. |