- Newest
- Most votes
- Most comments
Thanks for the feedback! Yes, adding a metric for table size is on our roadmap. I don't have any timing to share at this time, but we will update this forum post when it is available.
Hello, are there any updates on size metrics? It is essential for our work. Thanks!
Hi x0r - no updates yet. Quick questions for you - are you interested in the table size in term of GBs (i.e., billable storage size) or in terms of rows. How are you using this data? Also, do you need it to be real-time, or is periodic updates acceptable (i.e., we would update the metric on an interval).
To get the storage usage of your Keyspaces workload you can the get-cost- and-usage- with- resource API. You can query this API via the AWS CLI. The API can be used in granularity of Monthly, Daily and Hourly to fit your use case.
Here is the documentation for this API and information on how to use it:
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ce/get-cost-and-usage-with-resources.html
First you will need to go into AWS Cost management preferences and click the box that says Hourly and Resource level data.
(picture included, screenshot at the top you just have to click on it)
Here is an example of a query that will tell you the storage usage Hourly.
-
first you have to use the vi to save a file in the AWS CLI called "filter.json"
-
Copy& Paste this is what you want to include in your filter.json file:
{
"Dimensions": {
"Key": "SERVICE",
"Values": [
"Amazon Keyspaces (for Apache Cassandra)"
]},
"Dimensions": {
"Key": "USAGE_TYPE",
"Values": [
"TimedStorage-ByteHrs"
]
}
}
3.The you will need to do this query, You will want to change the time period to you desired date and hour.
aws ce get-cost-and-usage --time-period Start="2021-10-18T10:00:00Z",End="2021-10-18T11:00:00Z" --granularity HOURLY --metrics "BlendedCost" "UnblendedCost" "UsageQuantity" --group-by Type=DIMENSION,Key=SERVICE Type=TAG,Key=Environment --filter file://filters.json
Amazon Keyspaces now reports table size metric to CloudWatch. This will report the billiable table size which is the raw size of a single replica. While Amazon Keyspaces replicates data three times over multiple availability zones, it only charges you for one. You can also leverage the following Cloudformation template to build cloudwatch dashboard. https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates
Relevant content
- asked 2 years ago
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago