Skip to main content
idle · gcp

Spanner instances with no API requests across their measured history

resource types
1
rule IDs covered
1
severity
high

What does ZopNight detect here?

Spanner instances are flagged at high severity when `spanner.googleapis.com/api/request_count` shows no requests at all, on average or at peak, over the 30-day lookback. Spanner charges every hour for provisioned compute capacity in nodes or processing units, so an instance nobody queries bills its full node-hours and ZopNight counts the whole cost as recoverable.

Signal and threshold

How ZopNight evaluates Spanner instances with no API requests across their measured history.
Field Value
Rule IDsRC-1243
Categoryidle
Severityhigh
Metricspanner.googleapis.com/api/request_count
Thresholdzero API requests, average and peak
Evaluation window30d
SourceZopNight
Permissions usedspanner.instances.list · monitoring.timeSeries.list

Compute capacity is the Spanner bill

Spanner prices compute by what you provision. Google’s Spanner pricing says it tracks an instance’s compute capacity in nodes or processing units over time and charges nodes times the hourly rate, which varies by edition and region. Capacity can be smaller than one node (1,000 processing units), and any capacity you provision is billed for at least an hour. Storage, backups and replication are charged on top.

None of that depends on traffic. A proof-of-concept instance left behind after the project moved on bills exactly what it billed at peak.

Confirming the instance is unused

Terminal window
gcloud spanner instances list

For each candidate, chart spanner.googleapis.com/api/request_count over 30 days in Metrics Explorer. The metric is a rate of Spanner API requests per second, reported per instance and database, so a flat zero across every database means nothing is connecting.

The rule’s test

ZopNight reads the instance’s API request metric by name and fires only when both the average and the peak are zero across the data it holds for a 30-day lookback. The instance also has to have a known monthly cost. The finding carries high severity, and its remedy is deleting the instance.

No request data, no finding

Spanner request activity only exists as a Cloud Monitoring series, so there is no fallback signal. When that series is missing, the rule stays silent rather than treating silence as zero. Any request at all in the window, even one, also clears the instance, as does an instance that cannot be priced.

Saving equals the monthly run-rate

Terminal window
saving = current monthly instance cost
cost after deletion = 0

If the instance must stay for a future launch, reducing its compute capacity is the smaller win.

Deleting an instance safely

  1. Confirm with the owners that no service, job or failover plan depends on it.
  2. Export databases worth keeping with the Spanner to Cloud Storage Avro Dataflow template.
  3. Turn off deletion protection on any database that has it; Google blocks instance deletion until you do.
  4. Delete the instance: gcloud spanner instances delete INSTANCE_ID.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·