El recommenderde espacio en disco agotado de Cloud SQL genera recomendaciones de forma proactiva que te permiten reducir el riesgo de tiempo de inactividad que pueden causar las instancias que se quedan sin espacio en el disco.
Puedes aplicar estas recomendaciones cuando una instancia de Cloud SQL se acerque al límite de almacenamiento. En esta página, se describe cómo funciona este recomendador y cómo usarlo.
Cómo funciona
El recomendador de espacio en disco agotado de Cloud SQL analiza la tendencia del uso de almacenamiento durante los últimos 30 días. Cuando una instancia está llegando al límite en el que es probable que se quede sin espacio dentro de los próximos 1 a 30 días, el recomendador genera recomendaciones para aumentar manualmente la capacidad de almacenamiento, configurar la capacidad de almacenamiento para que aumente automáticamente o liberar espacio.
Obtén una lista de las recomendaciones para instancias sin espacio de almacenamiento en el disco
Puedes enumerar las recomendaciones de instancias sin espacio de almacenamiento en el disco mediante la consola de Google Cloud, gcloud o la API de Recommender.
Las recomendaciones para instancias sin espacio de almacenamiento en el disco disco se muestran si tienes instancias que están por ocupar toda la capacidad del disco.
Console
Para mostrar una lista de las recomendaciones para instancias sin espacio de almacenamiento en el disco con la consola de Google Cloud, sigue estos pasos:
En la tarjeta Evita el tiempo de inactividad para las instancias de SQL, haz clic en Ver todo.
gcloud
A fin de enumerar las recomendaciones para instancias sin espacio de almacenamiento en el disco con gcloud, ejecuta el comando gcloud recommender recommendations list de la siguiente manera:
gcloud recommender recommendations list \
--project=PROJECT_ID \
--location=LOCATION \
--recommender=google.cloudsql.instance.RECOMMENDER
Reemplaza lo siguiente:
PROJECT_ID: el ID de tu proyecto
LOCATION: Es una región, como us-central1
RECOMMENDER: El ID del recomendador, como OutOfDiskRecommender.
API
A fin de mostrar una lista de las recomendaciones para instancias sin espacio de almacenamiento en el disco con la API de Recommendations, llama al método recommendations.list de la siguiente manera:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
Reemplaza lo siguiente:
PROJECT_ID: ID del proyecto
LOCATION: Es una región, como us-central1.
RECOMMENDER: El ID del recomendador, como OutOfDiskRecommender.
Visualiza las estadísticas y las recomendaciones detalladas
Puedes ver estadísticas y recomendaciones detalladas sobre las instancias que están casi sin espacio en el disco mediante la consola de Google Cloud, gcloud o la API de Recommender.
Console
Para ver estadísticas y recomendaciones detalladas sobre las instancias que casi no tienen espacio en el disco mediante la consola de Google Cloud, haz clic en el botón de recomendaciones en la lista de instancias.
gcloud
Para ver estadísticas y recomendaciones detalladas sobre las instancias que están casi sin espacio en el disco con gcloud, ejecuta el comando gcloud recommender insights list de la siguiente manera:
gcloud recommender insights list \
--project=PROJECT_ID \
--location=LOCATION \
--insight-type=google.cloudsql.instance.INSIGHT_TYPE
Reemplaza lo siguiente:
PROJECT_ID: ID del proyecto
LOCATION: Es una región, como us-central1.
INSIGHT_TYPE: Es el ID del tipo de estadísticas DiskUsageTrendInsight.
API
Para ver estadísticas y recomendaciones detalladas sobre las instancias que están casi sin espacio en el disco con la API de Recommendations, llama al método insights.list de la siguiente manera:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights
Reemplaza lo siguiente:
PROJECT_ID: ID del proyecto
LOCATION: Es una región, como us-central1.
INSIGHT_TYPE: Es el ID del tipo de estadísticas DiskUsageTrendInsight.
En la siguiente tabla, se enumeran las estadísticas y recomendaciones que genera el recomendador para instancias sin espacio en disco de Cloud SQL. Los subtipos se pueden ver en los resultados de gcloud y la API.
Estadística
Recomendación
Según la tendencia del uso actual de almacenamiento, es probable que la instancia se quede sin espacio en el disco, lo que puede provocar un tiempo de inactividad.
Subtipo: TRENDING_OUT_OF_DISK
Habilita el crecimiento automático, aumenta de forma manual la capacidad de almacenamiento o libera espacio en el disco.
Subtipo: ENABLE_AUTO_STORAGE_INCREASE
Aplicar recomendaciones
Evalúa las recomendaciones con cuidado y realiza una de las siguientes acciones:
Para examinar la recomendación, haz clic en Ver instancia.
Aparecerá un banner en la parte superior de la página que proporciona una recomendación.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["# Monitor disk availability\n\n\u003cbr /\u003e\n\n[MySQL](/sql/docs/mysql/using-ood-recommender \"View this page for the MySQL database engine\") \\| PostgreSQL \\| [SQL Server](/sql/docs/sqlserver/using-ood-recommender \"View this page for the SQL Server database engine\")\n\n\u003cbr /\u003e\n\nThe Cloud SQL out-of-disk [recommender](/recommender/docs/overview) proactively\ngenerates recommendations that help you reduce the risk\nof downtime that might be caused by your instances running out of disk space.\nYou can apply these recommendations when a Cloud SQL instance is trending\ntoward a storage limit. This page describes how this recommender works and how\nto use it.\n\nHow it works\n------------\n\nThe Cloud SQL out-of-disk recommender analyzes the storage utilization trend\nover the last 30 days. When an instance is trending toward a limit\nwhere it's likely to run out of space within the next 1 to 30 days, the recommender\ngenerates related recommendations to manually increase the storage capacity, set\nthe storage capacity to automatically increase, or free up space.\n\nPricing\n-------\n\nThe Cloud SQL out-of-disk recommender is included in the [Standard Google Cloud support package](/recommender/pricing).\n\nBefore you begin\n----------------\n\nBefore you can view recommendations and insights, do the following:\n\n- To get the permissions to view and work with insights and recommendations, ensure that you have the required [roles](/sql/docs/postgres/project-access-control#roles).\n\n For more information about roles, see [understanding roles](/iam/docs/understanding-roles) and [granting IAM permissions](/iam/docs/granting-changing-revoking-access).\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\nList out-of-disk recommendations\n--------------------------------\n\nYou can list out-of-disk instance recommendations by\nusing the Google Cloud console, `gcloud`, or the Recommender API.\n\nOut-of-disk recommendations are shown only if you have instances that\nare nearing disk capacity. \n\n### Console\n\nTo list out-of-disk recommendations by using the Google Cloud console, follow these steps:\n\n1. Go to the **Cloud SQL Instances** page.\n\n [Go to Cloud SQL Instances](https://console.cloud.google.com/sql/instances)\n2. Click **View all** on the out-of-disk recommendations banner.\n\nAlternatively, follow these steps:\n\n1. Go to the **Recommendation Hub** . See also [Getting started with Recommendation Hub](/recommender/docs/recommendation-hub/identify-configuration-problems).\n\n [Go to the Recommendation Hub](https://console.cloud.google.com/home/recommendations/)\n2. In the **Prevent Downtime for SQL instances** card, click **View all**.\n\n### gcloud\n\nTo list out-of-disk recommendations by using `gcloud`, run the\n[`gcloud recommender recommendations list`](/sdk/gcloud/reference/recommender/recommendations/list)\ncommand as follows: \n\n```\ngcloud recommender recommendations list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--recommender=google.cloudsql.instance.RECOMMENDER\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`\n- \u003cvar translate=\"no\"\u003eRECOMMENDER\u003c/var\u003e: The ID of the recommender as `OutOfDiskRecommender`.\n\n### API\n\nTo list out-of-disk recommendations by using the\n[Recommendations API](/recommender/docs/using-api), call the\n[`recommendations.list`](/recommender/docs/reference/rest/v1beta1/projects.locations.recommenders.recommendations/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eRECOMMENDER\u003c/var\u003e: The ID of the recommender as `OutOfDiskRecommender`.\n\nView insights and detailed recommendations\n------------------------------------------\n\nYou can view insights and detailed recommendations about instances\nthat are nearly out of disk space by using the Google Cloud console,\n`gcloud`, or the Recommender API. \n\n### Console\n\nTo view insights and detailed recommendations about instances that are nearly\nout of disk space by using the Google Cloud console, click the recommendation\nbutton in the list of instances.\n\n### gcloud\n\nTo view insights and detailed recommendations about instances that are nearly\nout of disk space by using `gcloud`, run the\n[`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list)\ncommand as follows: \n\n```\ngcloud recommender insights list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--insight-type=google.cloudsql.instance.INSIGHT_TYPE\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: The ID of the insight type as `DiskUsageTrendInsight`.\n\n### API\n\nTo view insights and detailed recommendations about instances that are nearly\nout of disk space by using the [Recommendations API](/recommender/docs/using-api),\ncall the [`insights.list`](/recommender/docs/reference/rest/v1beta1/projects.locations.insightTypes.insights/list)\nmethod as follows: \n\n```\nGET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003eINSIGHT_TYPE\u003c/var\u003e: The ID of the insight type as `DiskUsageTrendInsight`.\n\nThe following table lists the insight and recommendation that the Cloud SQL\nout-of-disk recommender generates. The subtypes are visible in the `gcloud` and\nAPI results.\n\nApply recommendations\n---------------------\n\nEvaluate the recommendations carefully and do any of the following:\n\n- To examine the recommendation, click **View instance**.\n\n A banner appears at the top of the page providing a recommendation.\n\n [Edit](/sql/docs/postgres/edit-instance) the instance, if required, to [manually increase](/sql/docs/postgres/instance-settings#storage-capacity-2ndgen) the storage capacity and set the storage\n capacity to [automatically increase](/sql/docs/postgres/instance-settings#storage-capacity-2ndgen).\n Alternatively, delete data to free up space.\n- To dismiss the recommendation so that it's de-emphasized and appears dimmed,\n click **Dismiss**.\n\n- To close the panel without applying or dismissing the recommendation, click\n **Cancel**.\n\nWhat's next\n-----------\n\n- [Reduce idle Cloud SQL instances](/sql/docs/postgres/recommender-sql-idle)\n- [Reduce overprovisioned Cloud SQL instances](/sql/docs/postgres/recommender-sql-overprovisioned)\n- [Blog: Maximize your Cloud ROI](https://cloud.google.com/blog/products/management-tools/active-assist-comes-to-google-cloud)\n- [Blog: Do more with less](https://cloud.google.com/blog/products/databases/reduce-cloud-sql-costs-with-optimizations-by-active-assist)\n- [Google Cloud recommenders](/recommender/docs/recommenders)"]]