GCP Datastore¶
Collect GCP Datastore metrics.
Configuration¶
Install Func¶
We recommend enabling TrueWatch Integration - Extensions - Managed Func. All prerequisites are installed automatically; continue with the script installation.
If you deploy Func yourself, see Self-deploying Func.
Install Script¶
- Log in to the Func console, click [Script Market], open the TrueWatch Script Market, and search for
integration_gcp_datastore. - Click [Install], then enter the required parameters: account file name, Target Principal, and account name.
- Click [Deploy Startup Script]. The system automatically creates a
Startupscript set and configures the corresponding startup script. - After enabling it, find the automatic trigger configuration under "Management / Automatic Trigger Configuration". Click [Execute] to run it immediately, then review the task record and logs.
Verification¶
- Under "Management / Automatic Trigger Configuration", confirm that the task exists and check its task records and logs for errors.
- In TrueWatch, check "Infrastructure / Custom" for the corresponding asset information.
- In TrueWatch, check "Metrics" for the corresponding measurement and monitoring data.
Metrics¶
GCP Datastore metrics are stored in the gcp_datastore measurement. The original metrics come from the Cloud Monitoring datastore.googleapis.com/ namespace. Some Firestore metrics written to the firestore.googleapis.com/Database resource also apply to databases in Datastore mode. The table below lists key metrics; see GCP Datastore metrics for the complete metric catalog.
| Metric | Original Metric | Description | Unit |
|---|---|---|---|
| api_request_count | api/request_count |
Api request count | Count |
| entity_read_sizes | entity/read_sizes |
Entity read sizes | Bytes |
| entity_write_sizes | entity/write_sizes |
Entity write sizes | Bytes |
| index_write_count | index/write_count |
Index write count | Count |
Common metric labels include api_method, response_code, and op. Use them to analyze requests by API method, response status, and entity operation type.