Euca2ools Guide / CloudWatch-Compatible Commands |
Gets time-series data for one or more statistics for a given metric.
euwatch-get-stats MetricName --namespace value --statistics value[,value...] [--dimensions "key1=value1, key2=value2..." ] [--end-time value ] [--period value ] [--start-time value ] [--unit value ]
Option | Description | Required |
---|---|---|
MetricName | Metric name that corresponds to the one contained in the gathered metric. You can also set this value using --metric-name. | Yes |
--dimensions "key1=value1,key2=value2..." | Dimensions (one or more) along which the metric data was originally stored. If no dimensions are specified, then the statistics belonging to the specified non-dimensional metric will be returned. If you don't enter a value for dimensions, Eucalyptus assumes there are no dimensions. | No |
--end-time value | Timestamp of the last data point to return, inclusive. For example,
2009-11-25T19:00:00+00:00. Timestamp will be rounded down to the nearest minute. The
dateTime type uses ISO 8601. Default: now |
No |
-n, --namespace value | Namespace of the desired metric. This must match the namespace that was specified when the desired metric was initially reported. | Yes |
--period value | Granularity, in seconds, of the returned data points. Period must be at least
60 seconds and must be a multiple of 60. Default: 60 seconds. |
No |
-s, --statistics value1,value2,value3... | Statistics to be returned for the desired metric. Valid values: Average | Sum | Maximum | Minimum |
Yes |
--start-time value | Timestamp of the first data point to return, inclusive. For example,
2009-11-25T19:00:00+00:00. Timestamp will be rounded down to the nearest minute. The
dateTime type uses ISO 8601. Default: one hour in the past |
No |
--unit value | Unit that the metric was reported in. Valid values: Seconds | Bytes | Bits | Percent | Count | Bytes/Second | Bits/Second | Count/Second | None |
No |
Option | Description |
---|---|
--show-empty-fields | Show empty fields using (nil) as a placeholder to indicate that this data was not requested. Empty fields are not shown by default. |
--region value | Specify region value as the cloud region to use. You can set this by using the environment variable AWS_DEFAULT_REGION. |
-U,--url value | Overrides the URL for the service call with the value entered. You can set this by using the environment variable AWS_AUTOSCALING_URL. |
-I, --access-key-id value | User's access key ID |
-S, --secret-key value | User's AWS secret Key to use. |
--debug | Prints what the command sends to the server and what it receives from the server. Use when you're trying to debug Euca2ools. |
--debugger | Enable interactive debugger on error. |
--version | Display the version of this tool. |
-h,--help | Display the manual page for the command. |
This command returns a table that contains the following:
The follow example returns the average, minimum, and maximum CPU utilization for instance i-c07704a9, at one hour resolution.
euwatch-get-stats CPUUtilization --start-time 2013-02-14T23:00:00.000Z --end-time 2013-03-14T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum" --namespace "AWS/EC2" --dimensions "InstanceId=i-c07704a9"
The following example returns CPU utilization across your fleet.
euwatch-get-stats CPUUtilization --start-time 2013-02-14T23:00:00.000Z --end-time 2013-03-14T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum" --namespace "AWS/EC2"
The following example returns the average, minimum, and maximum request count made to the dev stack of TestService for a particular user, at one hour resolution.
euwatch-get-stats RequestCount --start-time 2012-11-24T23:00:00.000Z --end-time 2012-11-25T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum" --namespace "TestService" --dimensions "User=SomeUser,Stack=dev"
The following example shows RequestCount statistics across all of "TestService".
euwatch-get-stats RequestCount --start-time 2012-11-24T23:00:00.000Z --end-time 2012-11-25T23:00:00.000Z --period 3600 --statistics "Average,Minimum,Maximum,SampleCount" --namespace "TestService"
The following shows sample output for this command.
Time Samples Average Unit 2013-05-19 00:03:00 2.0 0.19 Percent 2013-05-19 00:04:00 2.0 0 Percent 2013-05-19 00:05:00 2.0 0 Percent 2013-05-19 00:06:00 2.0 0 Percent 2013-05-19 00:07:00 2.0 0 Percent 2013-05-19 00:08:00 2.0 0 Percent 2013-05-19 00:09:00 2.0 0 Percent 2013-05-19 00:10:00 2.0 0 Percent 2013-05-19 00:11:00 2.0 0 Percent 2013-05-19 00:12:00 2.0 0.195 Percent 2013-05-19 00:13:00 2.0 0.215 Percent