Reputation: 11
How to get GCP Spanner Instance or Database size information, along with CPU utilization etc. through gcloud command line line tool?
I can find the same information in GCP portal, but unable to fetch the same information through "gcloud" command line tool. I did not find the relevant documentation on having those parameter switches to collect the desired information.
Is it still not supported through gcloud spanner sdk?
Upvotes: 1
Views: 607
Reputation: 66
Unfortunately retrieving these stats via the Gcloud Spanner SDK is not supported. I've filed a feature request internally to track this. For future reference, feel free to file feature requests/bugs at https://cloud.google.com/spanner/docs/getting-support#file_bugs_or_feature_requests
[edit] If it's helpful, Cloud Spanner does have some metrics available via Stackdriver: https://cloud.google.com/monitoring/api/metrics_gcp#gcp-spanner
Currently, not all of the metrics available in the GCP console are available in stackdriver but CPU utilization and instance size are there.
Documentation for programmatically reading from the Stackdriver API is here: https://cloud.google.com/monitoring/api/v3/
https://cloud.google.com/monitoring/custom-metrics/reading-metrics
Upvotes: 3