CloudWatch

Amazon describes the service as:

Amazon CloudWatch is a web service that provides monitoring for AWS cloud resources, starting with Amazon EC2. It provides customers with visibility into resource utilization, operational performance, and overall demand patterns-including metrics such as CPU utilization, disk reads and writes, and network traffic. To use Amazon CloudWatch, simply select the Amazon EC2 instances that you'd like to monitor; within minutes, Amazon CloudWatch will begin aggregating and storing monitoring data that can be accessed using web service APIs or Command Line Tools. Amazon

Service List

Table of Contents

mon-get-stats

Service List | Table of Contents


SYNOPSIS
   mon-get-stats
        MeasureName  --statistics  value[,value...] [--dimensions 
       "key1=value1,key2=value2..." ] [--end-time  value ] [--namespace  value ]
       [--period  value ] [--start-time  value ] [--unit  value ]
        [General Options]

DESCRIPTION
       This call will get time-series data, where the time is presented in UTC, for
    one or more statistics of a given MeasureName.

ARGUMENTS
   MeasureName
       The measure name that corresponds to one contained in  the gathered
       Metric. You can also set this value using "--measure-name". Required.

SPECIFIC OPTIONS
   --dimensions "key1=value1,key2=value2..." 
       Dimensions (one or more) along which to aggregate the returned data. If
       no dimensions are specified, the aggregate of all the measures with the
       given measure name are returned.

   --end-time VALUE
       The timestamp of the last datapoint to return, inclusive. For example,
       2008-02-26T19:00:00+00:00. Timestamp will be rounded down to the nearest
       minute.The dateTime type uses ISO 8601. The default for this is now.

   --namespace VALUE
       The namespace a given metric is valid in. Currently, these are mostly
       composed of AWS/EC2 and AWS/ELB.

   --period VALUE
       The granularity (in seconds) of the returned datapoints. Period must be
       at least 60 seconds and must be a multiple of 60. The default is 60
       seconds.

   -s, --statistics VALUE1,VALUE2,VALUE3...
       The valid statistics to be returned for the given metric. Possible values
       are: Average, Sum, Maximum, or Minimum. Required.

   --start-time VALUE
       The timestamp of the first datapoint to return, inclusive. For example,
       2008-02-26T19:00:00+00:00. Timestamp will be rounded down to the nearest
       minute. The dateTime type uses ISO 8601. The default for this is 1 hour
       in the past.

   --unit VALUE
       Unit of the metric.


GENERAL OPTIONS
   --aws-credential-file VALUE
       Location of the file with your AWS credentials. This value can be set by
       using the environment variable 'AWS_CREDENTIAL_FILE'.

   --connection-timeout VALUE
       Specify a connection timeout VALUE (in seconds). The default value is
       '30'.

   --delimiter VALUE
       What delimiter to use when displaying delimited (long) results.

   --ec2-cert-file-path VALUE
       No description available for this parameter. This value can be set by
       using the environment variable 'EC2_CERT'.

   --ec2-private-key-file-path VALUE
       No description available for this parameter. This value can be set by
       using the environment variable 'EC2_PRIVATE_KEY'.

   --headers
       If you are displaying tabular or delimited results, it includes the
       column headers. If you are showing xml results, it returns the HTTP
       headers from the service request, if applicable. This is off by default.

   -I, --access-key-id VALUE
       Specifcy VALUE as the AWS Access Id to use.

   --region VALUE
       Specify region VALUE as the web service region to use. This value can be
       set by using the environment variable 'EC2_REGION'.

   -S, --secret-key VALUE
       Specify VALUE as the AWS Secret Key to use.

   --show-empty-fields
       Show empty fields and rows, using a "(nil)" value. The default is to not
       show empty fields or columns.

   --show-request
       Displays the URL the tools used to call the AWS Service. The default
       value is 'false'.

   --show-table, --show-long, --show-xml, --quiet
       Specify how the results are displayed: tabular, delimited (long), xml, or
       no output (quiet). Tabular shows a subset of the data in fixed
       column-width form, while long shows all of the returned values delimited
       by a character. The xml is the raw return from the service, while quiet
       suppresses all standard output. The default is tabular, or 'show-table'.

   -U, --url VALUE
       This option will override the URL for the service call with VALUE. This
       value can be set by using the environment variable 'AWS_CLOUDWATCH_URL'.


INPUT EXAMPLES

    This shows how to get the average, min, and max CPU utilization for EC2
    instance i-c07704a9, at 1 hour resolution.

$PROMPT>mon-get-stats CPUUtilization --start-time 2009-02-14T23:00:00.000Z --end-time 2009-03-14T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum" --namespace "AWS/EC2" --dimensions "InstanceId=i-c07704a9"


    This shows CPU utilization across your EC2 fleet.

$PROMPT2>mon-get-stats CPUUtilization --start-time 2009-02-14T23:00:00.000Z --end-time 2009-03-14T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum" --namespace "AWS/EC2"


OUTPUT
    This command returns a table that contains the following:
    * Time - Time the metrics were taken.
    * Samples - Number of samples in metric.
    * Average - Average value.
    * Sum - Sum of values.
    * Minimum - Minimum observed value.
    * Maximum - Maximum observed value.
    * Unit - Unit of the metric.

OUTPUT EXAMPLES

    This is an example of an output of the Samples and Average metrics at one
    minute resolution.

Time                 Samples  Average  Unit   
2009-05-19 00:03:00  2.0      0.19     Percent
2009-05-19 00:04:00  2.0      0        Percent
2009-05-19 00:05:00  2.0      0        Percent
2009-05-19 00:06:00  2.0      0        Percent
2009-05-19 00:07:00  2.0      0        Percent
2009-05-19 00:08:00  2.0      0        Percent
2009-05-19 00:09:00  2.0      0        Percent
2009-05-19 00:10:00  2.0      0        Percent
2009-05-19 00:11:00  2.0      0        Percent
2009-05-19 00:12:00  2.0      0.195    Percent
2009-05-19 00:13:00  2.0      0.215    Percent
...



mon-list-metrics

Service List | Table of Contents


SYNOPSIS
   mon-list-metrics
        [General Options]

DESCRIPTION
       This call will get a complete list of all the metrics that the system is
    storing for your AWS account. Note: Any metric not seen for 2 weeks will be
    aged out from this list as that is the retention period for data.

GENERAL OPTIONS
   --aws-credential-file VALUE
       Location of the file with your AWS credentials. This value can be set by
       using the environment variable 'AWS_CREDENTIAL_FILE'.

   --connection-timeout VALUE
       Specify a connection timeout VALUE (in seconds). The default value is
       '30'.

   --delimiter VALUE
       What delimiter to use when displaying delimited (long) results.

   --ec2-cert-file-path VALUE
       No description available for this parameter. This value can be set by
       using the environment variable 'EC2_CERT'.

   --ec2-private-key-file-path VALUE
       No description available for this parameter. This value can be set by
       using the environment variable 'EC2_PRIVATE_KEY'.

   --headers
       If you are displaying tabular or delimited results, it includes the
       column headers. If you are showing xml results, it returns the HTTP
       headers from the service request, if applicable. This is off by default.

   -I, --access-key-id VALUE
       Specifcy VALUE as the AWS Access Id to use.

   --region VALUE
       Specify region VALUE as the web service region to use. This value can be
       set by using the environment variable 'EC2_REGION'.

   -S, --secret-key VALUE
       Specify VALUE as the AWS Secret Key to use.

   --show-empty-fields
       Show empty fields and rows, using a "(nil)" value. The default is to not
       show empty fields or columns.

   --show-request
       Displays the URL the tools used to call the AWS Service. The default
       value is 'false'.

   --show-table, --show-long, --show-xml, --quiet
       Specify how the results are displayed: tabular, delimited (long), xml, or
       no output (quiet). Tabular shows a subset of the data in fixed
       column-width form, while long shows all of the returned values delimited
       by a character. The xml is the raw return from the service, while quiet
       suppresses all standard output. The default is tabular, or 'show-table'.

   -U, --url VALUE
       This option will override the URL for the service call with VALUE. This
       value can be set by using the environment variable 'AWS_CLOUDWATCH_URL'.


INPUT EXAMPLES

    This shows how to get a list of all your metrics.

$PROMPT>mon-list-metrics
                

OUTPUT
    This command returns a table that contains the following:
    * Measure Name - The name of the measure attached to this metric.
    * Namespace - The namespace associated with this metric.
    * Dimensions - A list of the dimension names and values associated with this
    metric.

OUTPUT EXAMPLES

    This is an example of an output of a call to 'mon-list-metrics'.

Measure Name                 Namespace  Dimensions
CPUUtilization               AWS/EC2    {InstanceId=i-e7e48a8e}
CPUUtilization               AWS/EC2    {InstanceId=i-231d744a}
CPUUtilization               AWS/EC2    {InstanceId=i-22016e4b}
CPUUtilization               AWS/EC2    {InstanceId=i-b0345cd9}
CPUUtilization               AWS/EC2    {InstanceId=i-539dff3a}
CPUUtilization               AWS/EC2    {InstanceId=i-af3544c6}
CPUUtilization               AWS/EC2    {InstanceId=i-d4f29ebd}
CPUUtilization               AWS/EC2    {ImageId=ami-de4daab7}
...



mon-version

Service List | Table of Contents



Amazon CloudWatch CLI version 1.0.0.22 (API 2009-05-15)


© 1998-2010 AF-Design, All rights reserved.