| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The following scenarios cover operations for monitoring Amazon DynamoDB tables.
Amazon DynamoDB and Amazon CloudWatch are integrated so you can gather a variety of metrics. You can monitor these metrics using the Amazon CloudWatch console, Amazon CloudWatch's own command-line interface, or programmatically using the Amazon CloudWatch API. CloudWatch also allows you to set alarms when you reach a specified threshold for a metric.
For more information about using Amazon CloudWatch and alarms, see the Amazon CloudWatch Documentation.
To view Amazon DynamoDB information for your account
Sign in to the AWS Management Console and open the Amazon CloudWatch console at https://console.aws.amazon.com/cloudwatch/.
Click View Metrics.
The available Amazon DynamoDB metric options appear in the Viewing list.
The metric options in the Viewing list serve as a filter for refining your results. The options differentiate metrics at the account level versus metrics at table level or operation level.
Select one of the following metric options from the Viewing list.
| Viewing Option | Description |
|---|---|
All Metrics | Account level metrics for all of your services. |
AWS/DynamoDB | Account level metrics for all of your Amazon DynamoDB tables, such as
UserErrors. |
AWS/DynamoDB, TableName | Table level metrics, such as
ConsumedReadCapacityUnits over a specified
period of time. |
AWS/DynamoDB, TableName, Operation |
Metrics for a specified operation on the specified table,
such as the |
AWS/DynamoDB, Operation | Metrics for API calls across tables, such as
ThrottledRequests for all BatchGetItem
operations across several tables over a specified period of
time. Note A BatchGetItem request on a single table does not
show in these results. Use |
Depending on the Viewing list selection, Amazon CloudWatch displays a list of available metrics at the selected level.
Click a specific item to see more detail, such as a graph.
Graphs showing the metrics for the selected item display in the bottom of the console.
To gather disk storage statistics for a DB Instance
Install the Amazon CloudWatch command line tool. For instructions and links about the tool, see Amazon CloudWatch documentation.
The domain is docs.aws.amazon.com
Use the Amazon CloudWatch command line client commands to fetch information. The parameters for each command are listed in Amazon DynamoDB Metrics and Dimensions.
The following example uses the command mon-get-stats with the following parameters to determine how many requests exceeded your provisioned throughput during a specific time period.
PROMPT>mon-get-stats SuccessfulRequestLatency --aws-credential-file ./credential-file-path.template --namespace "AWS/DynamoDB" --statistics "Average" --start-time 2011-11-14T00:00:00Z --end-time 2011-11-16T00:00:00Z --period 300 --dimensions "Operation=BatchGetItem"
Amazon CloudWatch also supports a Query API so you can request information programmatically.
Familiarize yourself with the Amazon CloudWatch API and how to use it. For more information, see the Amazon CloudWatch Query API documentation and CloudWatch API Reference.
When a CloudWatch action requires a parameter that is specific to Amazon DynamoDB
monitoring, such as MetricName, use the values listed in
Amazon DynamoDB Metrics and Dimensions.
For example, call the Amazon CloudWatch API
GetMetricStatistics using the following
parameters:
Statistics.member.1 =
Average
Dimensions.member.1 =
Operation=PutItem,TableName=TestTable
Namespace =
AWS/DynamoDB
StartTime =
2011-11-14T00:00:00Z
EndTime =
2011-11-16T00:00:00Z
Period = 300
MetricName =
SuccessfulRequestLatency
Example What an API-based request looks like
The following example shows an API-based request for Amazon CloudWatch metrics. However, the following is just to show the form of the request. This exact request won't work for you unless your data matches the specific time frame and metrics. You have to construct your own request based on your own data.
http://monitoring.amazonaws.com/ ?SignatureVersion=2 &Action=SuccessfulRequestLatency &Version=2010-08-01 &StartTime=2011-11-14T00:00:00 &EndTime=2011-11-16T00:00:00 &Period=300 &Statistics.member.1=Average &Dimensions.member.1=Operation=PutItem,TableName=TestTable &Namespace=AWS/DynamoDB &MetricName=SuccessfulRequestLatency &Timestamp=2011-10-15T17%3A48%3A21.746Z &AWSAccessKeyId=<AWS Access Key ID> &Signature=<Signature>
The metric options in the Viewing list serve as a filter for refining your results. The options differentiate metrics at the account level versus metrics at table level or operation level.
| Viewing Option | Description |
|---|---|
All Metrics | Account level metrics for all of your services. |
AWS/DynamoDB | Account level metrics for all of your Amazon DynamoDB tables, such as
UserErrors. |
AWS/DynamoDB, TableName | Table level metrics, such as
ConsumedReadCapacityUnits over a specified period
of time. |
AWS/DynamoDB, TableName, Operation |
Metrics for a specified operation on the specified table, such
as the |
AWS/DynamoDB, Operation | Metrics for API calls across tables, such as
ThrottledRequests for all BatchGetItem operations
across several tables over a specified period of time. Note A single BatchGetItem request on a single table does
not show in these results. Use |
The following metrics are available from the Amazon DynamoDB Service. The service only sends metrics when they have a non-zero value. For example, if no requests generating a 400 status code occur in a time period, you would see no data for the UserErrors metric that reports requests generating a 400 status code.
Note
The Statistic values available through Amazon CloudWatch, such as
Average or Sum, are not always
applicable to every metric. However, they are all available through the console,
API, and command line client for all services. For each metric, be aware of the
list of Valid Statistics for the Amazon DynamoDB metrics to track useful information. For
example, Amazon CloudWatch can monitor each time an Amazon DynamoDB request is refused
(the ThrottledRequests metric). It marks that event as one
occurrence. If the request is retried and also refused, Amazon CloudWatch marks
the second event as one occurrence, too. The Sum statistic
is now 2. But, the Average statistic for the
ThrottledRequests metric is simply 1, if a request
is throttled in the specified time period, once or repeatedly. For the
ThrottledRequests metric, use the listed Valid Statistics
(either Sum or SampleCount) to see the trend of ThrottledRequests
over a specified time period.
| Metric | Description |
|---|---|
SuccessfulRequestLatency |
The number of successful requests in the specified time
period. By default, Note Cloudwatch also provides a SampleCount statistic: the total number of successful calls for a sample time period. View (namespace): Units: Milliseconds (or a count for SampleCount) Valid Statistics: Minimum, Maximum, Average, SampleCount |
UserErrors |
The number of requests generating a 400 status code (likely indicating a client error) response in the specified time period. View (namespace): Units: Count Valid Statistics: Sum, SampleCount |
SystemErrors |
The number of requests generating a 500 status code (likely indicating a server error) response in the specified time period. View (namespace): Units: Count Valid Statistics: Sum, SampleCount |
ThrottledRequests |
The number of user requests that exceeded the preset provisioned throughput limits in the specified time period. View (namespace): Units: Count Valid Statistics: Sum, SampleCount |
ProvisionedReadCapacityUnits |
The amount of read capacity units provisioned for the table. For more information, see Provisioned Throughput in Amazon DynamoDB. View (namespace): Units: Count Valid Statistics: Minimum, Maximum, Average, Sum |
ProvisionedWriteCapacityUnits |
The amount of write capacity units provisioned for the table. For more information, see Provisioned Throughput in Amazon DynamoDB. View (namespace): Units: Count Valid Statistics: Minimum, Maximum, Average, Sum |
ConsumedReadCapacityUnits |
The amount of read capacity units consumed over the specified time period, so you can track how much of your provisioned throughput is used. For more information, see Provisioned Throughput in Amazon DynamoDB. View (namespace): Note Use the Sum value to calculate the provisioned throughput. For example, get the Sum value over a span of 5 minutes. Divide the Sum value by the number of seconds in 5 minutes (300) to get an average for the ConsumedReadCapacityUnits per second. You can compare the calculated value to the provisioned throughput value you provide Amazon DynamoDB. View (namespace): Units: Count Valid Statistics: Minimum, Maximum, Average, Sum |
ConsumedWriteCapacityUnits |
The amount of write capacity units consumed over the specified time period, so you can track how much of your provisioned throughput is used. For more information, see Provisioned Throughput in Amazon DynamoDB. Note Use the Sum value to calculate the provisioned throughput. For example, get the Sum value over a span of 5 minutes. Divide the Sum value by the number of seconds in 5 minutes (300) to get an average for the ConsumedWriteCapacityUnits per second. You can compare the calculated value to the provisioned throughput value you provide Amazon DynamoDB. View (namespace): Units: Count Valid Statistics: Minimum, Maximum, Average, Sum |
ReturnedItemCount |
The number of items returned by a Scan or Query operation. View (namespace): Units: Count Valid Statistics: Minimum, Maximum, Average, SampleCount, Sum |
The metrics for Amazon DynamoDB are qualified by the values for the account, table name, or operation. Account level metrics display when you select AWS/DynamoDB as the viewing option. Otherwise, Amazon DynamoDB data can be retrieved along any of the following dimensions in the table below. Some metrics allow you to specify both a table name and operation, depending on the viewing option you specify.
|
Dimension |
Description |
|---|---|
TableName
|
This dimension limits the data you request to a specific table. This value can be any table name for the current account. |
Operation
|
The operation corresponds to the Amazon DynamoDB service API, and can be one of the following:
For all of the operations in the current Amazon DynamoDB service API, see Operations in Amazon DynamoDB. |