As the instance's workload changes, Cloud Spanner does not automatically adjust the number of nodes in the instance.
As a result, you need to set up several alerts to ensure that the instance stays within the recommended maximums for CPU utilization and the recommended limit for storage per node.
To create the recommended alerts:
In the Google Cloud Platform Console, select Monitoring, or use the following button:
Select Alerting > Create a Policy.
In the Find resource type and metric box, enter the values that may be required, for:
High priority CPU - spanner.googleapis.com/instance/cpu/utilization_by_priority.
24 hour rolling average CPU - spanner.googleapis.com/instance/cpu/smoothed_utilization.
storage - spanner.googleapis.com/instance/storage/used_bytes.
Click Show advanced options, then enter the recommended values for the alerting policy's target and configuration (refer to https://cloud.google.com/spanner/docs/monitoring-stackdriver)
Optional: To configure your notification settings, click Add Notification Channel.
You can elect to receive notifications by email, SMS, and several other options.
Optional: Enter a notification message in the Documentation section.
Name your policy and click Save.
Repeat these steps for each of the metrics.
Hope it helps!!
If you need to know more about Google Cloud, We recommend joining GCP Certification course today.