Monitor disk availability Stay organized with collections Save and categorize content based on your preferences.
The Cloud SQL out-of-diskrecommender proactivelygenerates recommendations that help you reduce the riskof downtime that might be caused by your instances running out of disk space.You can apply these recommendations when a Cloud SQL instance is trendingtoward a storage limit. This page describes how this recommender works and howto use it.
How it works
The Cloud SQL out-of-disk recommender analyzes the storage utilization trendover the last 30 days. When an instance is trending toward a limitwhere it's likely to run out of space within the next 1 to 30 days, the recommendergenerates related recommendations to manually increase the storage capacity, setthe storage capacity to automatically increase, or free up space.
Pricing
The Cloud SQL out-of-disk recommender is included in theStandard Google Cloud support package.
Before you begin
Before you can view recommendations and insights, do the following:
- To get the permissions to view and work with insights and recommendations,ensure that you have the requiredroles.
For more information about roles, seeunderstanding roles andgranting IAM permissions.Tasks Roles View recommendations One of these roles: recommender.cloudsqlViewer
orcloudsql.viewer
.Apply recommendations One of these roles: recommender.cloudsqlAdmin
,cloudsql.editor
, orcloudsql.admin
. Enable the Recommender API.
List out-of-disk recommendations
You can list out-of-disk instance recommendations byusing the Google Cloud console,gcloud
, or the Recommender API.
Out-of-disk recommendations are shown only if you have instances thatare nearing disk capacity.
Console
To list out-of-disk recommendations by using the Google Cloud console, follow these steps:
Go to theCloud SQL Instances page.
ClickView all on the out-of-disk recommendations banner.
Alternatively, follow these steps:
Go to theRecommendation Hub. See alsoGetting started with Recommendation Hub.
In thePrevent Downtime for SQL instances card, clickView all.
gcloud
To list out-of-disk recommendations by usinggcloud
, run thegcloud recommender recommendations list
command as follows:
gcloud recommender recommendations list \--project=PROJECT_ID \--location=LOCATION \--recommender=google.cloudsql.instance.RECOMMENDER
Replace the following:
PROJECT_ID
: Your project IDLOCATION
: A region, such asus-central1
RECOMMENDER
: The ID of the recommender asOutOfDiskRecommender
.
API
To list out-of-disk recommendations by using theRecommendations API, call therecommendations.list
method as follows:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.RECOMMENDER
: The ID of the recommender asOutOfDiskRecommender
.
View insights and detailed recommendations
You can view insights and detailed recommendations about instancesthat are nearly out of disk space by using the Google Cloud console,gcloud
, or the Recommender API.
Console
To view insights and detailed recommendations about instances that are nearlyout of disk space by using the Google Cloud console, click the recommendationbutton in the list of instances.
gcloud
To view insights and detailed recommendations about instances that are nearlyout of disk space by usinggcloud
, run thegcloud recommender insights list
command as follows:
gcloud recommender insights list \--project=PROJECT_ID \--location=LOCATION \--insight-type=google.cloudsql.instance.INSIGHT_TYPE
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asDiskUsageTrendInsight
.
API
To view insights and detailed recommendations about instances that are nearlyout of disk space by using theRecommendations API,call theinsights.list
method as follows:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights
Replace the following:
PROJECT_ID
: Your project ID.LOCATION
: A region, such asus-central1
.INSIGHT_TYPE
: The ID of the insight type asDiskUsageTrendInsight
.
The following table lists the insight and recommendation that the Cloud SQLout-of-disk recommender generates. The subtypes are visible in thegcloud
andAPI results.
Insight | Recommendation |
---|---|
Based on the current storage use trend, the instance is likely to run out of disk space, which can result in downtime. Subtype: TRENDING_OUT_OF_DISK | Enable auto grow, manually increase storage capacity, or free up disk space. Subtype: ENABLE_AUTO_STORAGE_INCREASE |
Apply recommendations
Evaluate the recommendations carefully and do any of the following:
To examine the recommendation, clickView instance.
A banner appears at the top of the page providing a recommendation.
Edit the instance, if required, tomanually increase the storage capacity and set the storagecapacity toautomatically increase.Alternatively, delete data to free up space.
To dismiss the recommendation so that it's de-emphasized and appears dimmed,clickDismiss.
To close the panel without applying or dismissing the recommendation, clickCancel.
What's next
- Reduce idle Cloud SQL instances
- Reduce overprovisioned Cloud SQL instances
- Blog: Maximize your Cloud ROI
- Blog: Do more with less
- Google Cloud recommenders
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.