GetMetricStatistics

Description

Returns the statistic data for the specified metric.

Request Parameters

  • Period – The granularity, in seconds, of the returned data points.
    • Required: Yes
    • Type: Int
    • Valid range: Value must be divisible by 60, minimum value is 60
  • StartTime – Starting date to retrieve a metric data
    • Required: Yes
    • Type: Datetime
  • EndTime – Ending date to retrieve a metric data
    • Required: Yes
    • Type: Datetime
  • MetricName – The name of the metric
    • Required: Yes
    • Type: String
    • Length constraints: from 1 to 255 symbols
  • Namespace – The namespace of the metric.
    • Required: Yes
    • Type: String
    • Length constraints: from 1 to 255 symbols
  • Statistics.member.n – The list of statistics
    • Required: Yes
    • Type: Array of strings
    • Valid values: Average | Sum | SampleCount | Maximum | Minimum
  • Dimensions.member.n – The metric dimensions (see User Guide)
    • Required: No
    • Type: Array of Dimension objects
    • Length constraints: from 1 to 10 items

Response Elements

  • Datapoints – The statistic data for the specified metric
  • Label – The text data for the specified metric
    • Type: String

Examples

c2-cw GetMetricStatistics Period <period> StartTime <start_time> EndTime <end_time> \
                          MetricName <metric_name> Namespace <namespace> \
                          Statistics.member.1 <statistic>

c2-cw GetMetricStatistics Period <period> StartTime <start_time> EndTime <end_time> \
                          MetricName <metric_name> Namespace <namespace> \
                          Statistics.member.1 <statistic> \
                          Dimensions.member.1.Name "InstanceId" \
                          Dimensions.member.1.Value <instance_id>