Euca2ools Guide / CloudWatch-Compatible Commands |
Adds metric data points to a metric.
euwatch-put-data -m METRIC -n NAMESPACE (-v FLOAT | -s Maximum=FLOAT,Minimum=FLOAT,SampleCount=F LOAT,Sum=FLOAT) [-d key1=value1,key2=value2,...] [-t YYYY-MM-DDThh:mm:ssZ] [-u UNIT] [--show-empty-fields] [-U URL] [--region USER@REGION] [-I KEY_ID] [-S KEY] [--security-token TOKEN] [--debug] [--debugger] [--version] [-h]
Option | Description | Required |
---|---|---|
-m METRIC, --metric-name METRIC | Name of the metric to which data points are to be added. | Yes |
-n NAMESPACE, --namespace NAMESPACE, value | Namespace for the metric. | Yes |
-v FLOAT, --value FLOAT, value | Data value for the metric. Exactly one of -v and -s is required. | Yes |
-d, --dimensions "key1=value1,key2=value2..." | The dimensions of the metric to which data points are to be added. | No |
-s, --statistic-values "key1=value1,key2=value2..." | Statistics to be provided for the given metric. You must specify
all four of the key values you want for this option, or else Eucalyptus
returns an error. Valid key values: SampleCount | Sum | Maximum | Minimum |
Yes |
-t, --timestamp value1,value2,value3... | Timestamp of the data point. For example, 2009-11-25T19:00:00+00:00. Timestamp will be rounded down to the nearest minute. The dateTime type uses ISO 8601. The default for this option is the time that this request was sent. | No |
-u, --unit value1,value2,value3... | The unit that the metric is being reported in. Valid unit values are Seconds | Bytes | Bits | Percent | Count | Bytes/Second | Bits/Second | Count/Second | None |
No |
-v, --value value1,value2,value3... | The value of the metric datum being put in. | 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. |
Eucalyptus does not return any output.
The following example puts statistic data for "RequestCount" in the "MyService" namespace. The metric contains no dimensions and so represents the overall RequestCount across the entire service. The measurement is a pre-aggregated statistic-values representing five earlier measurements whose maximum was 70, minimum was 30 and sum was 250.
euwatch-put-data --metric-name RequestCount --namespace "MyService" --timestamp 2009-11-25T00:00:00.000Z --statistic-values "Sum=250,Minimum=30,Maximum=70,SampleCount=5"
The following example puts user-specific "RequestCount" test data in the "MyService" namespace. The user and stack name are stored as dimensions in order to distinguish this metric from the service-wide metric in the example above.
euwatch-put-data --metric-name RequestCount --namespace "MyService" --dimensions "User=testUser,Stack=Test" --timestamp 2009-11-25T00:00:00.000Z --value 50