Der Out-of-Disk-recommender von Cloud SQL generiert proaktiv Empfehlungen, mit denen Sie das Risiko von Ausfallzeiten verringern können, die durch unzureichend Speicherplatz auf Ihren Instanzen verursacht werden können.
Sie können diese Empfehlungen anwenden, wenn eine Cloud SQL-Instanz zu einem Speicherlimit tendiert. Auf dieser Seite wird beschrieben, wie dieser Recommender funktioniert und wie er verwendet wird.
So gehts:
Out-of-Disk-Recommender von Cloud SQL analysiert den Trend der Speicherauslastung der letzten 30 Tage. Wenn eine Instanz einen Grenzwert erreicht, an dem der Speicherplatz innerhalb der nächsten 1 bis 30 Tage wahrscheinlich nicht mehr ausreicht, generiert der Recommender entsprechende Empfehlungen, um die Speicherkapazität manuell zu erhöhen, eine automatische Erhöhung der Speicherkapazität einzurichten, oder um Speicherplatz freizugeben.
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
Dabei gilt:
PROJECT_ID: Ihre Projekt-ID.
LOCATION: eine Region, z. B. us-central1
RECOMMENDER: die ID des Recommenders als OutOfDiskRecommender.
Informationen und detaillierte Empfehlungen anzeigen
Mit der Google Cloud Console, mit gcloud oder mit der Recommender API können Sie Informationen und detaillierte Empfehlungen zu Instanzen aufrufen, für die fast kein Speicherplatz mehr zur Verfügung steht.
Console
Klicken Sie in der Liste der Instanzen auf die Schaltfläche „Empfehlung“, um mithilfe der Google Cloud Console Informationen und detaillierte Empfehlungen zu Instanzen aufzurufen, für die fast kein Speicherplatz mehr verfügbar ist.
gcloud
Führen Sie den Befehl gcloud recommender insights list so aus, um mit gcloud Informationen und detaillierte Empfehlungen zu Instanzen anzuzeigen, die fast keinen Speicherplatz mehr haben:
gcloud recommender insights list \
--project=PROJECT_ID \
--location=LOCATION \
--insight-type=google.cloudsql.instance.INSIGHT_TYPE
Dabei gilt:
PROJECT_ID: Ihre Projekt-ID.
LOCATION: eine Region, z. B. us-central1
INSIGHT_TYPE: die ID des Informationstyps als DiskUsageTrendInsight
API
Um mithilfe der Recommendations API Informationen und detaillierte Empfehlungen zu Instanzen anzusehen, die fast keinen Speicherplatz mehr haben, rufen Sie die Methode insights.list so auf:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights
Dabei gilt:
PROJECT_ID: Ihre Projekt-ID.
LOCATION: eine Region, z. B. us-central1
INSIGHT_TYPE: die ID des Informationstyps als DiskUsageTrendInsight
In der folgenden Tabelle sind die vom Cloud SQL-Out-of-Disk Recommender generierten Informationen und Empfehlungen aufgeführt. Die Untertypen werden in den Ergebnissen von gcloud und der API angezeigt.
Insight
Empfehlung
Basierend auf dem aktuellen Speichernutzungstrend wird die Instanz wahrscheinlich bald keinen freien Speicherplatz mehr haben, was zu Ausfallzeiten führen kann.
Untertyp: TRENDING_OUT_OF_DISK
Aktivieren Sie die automatische Vergrößerung, erhöhen Sie die Speicherkapazität manuell oder geben Sie Speicherplatz frei.
Untertyp: ENABLE_AUTO_STORAGE_INCREASE
Empfehlungen übernehmen
Sehen Sie sich die Empfehlungen sorgfältig an und führen Sie einen der folgenden Schritte aus:
Klicken Sie zum Ansehen der Empfehlung auf Instanz aufrufen.
Oben auf der Seite wird ein Banner mit einer Empfehlung angezeigt.
Bearbeiten Sie die Instanz bei Bedarf, um die Speicherkapazität manuell zu erhöhen und die automatische Erhöhung der Speicherkapazität einzurichten.
Alternativ könne Sie Daten löschen, um Speicherplatz freizugeben.
Klicken Sie auf Schließen, um die Empfehlung zu verwerfen, sodass sie ausgegraut ist und grau angezeigt wird.
Klicken Sie auf Abbrechen, um das Feld zu schließen, ohne die Empfehlung zu übernehmen oder zu verwerfen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)"]]