Pemberi rekomendasi saat disk Cloud SQL kehabisan ruang penyimpanan secara proaktif
menghasilkan rekomendasi yang membantu Anda mengurangi risiko
periode nonaktif yang mungkin disebabkan oleh instance Anda yang kehabisan kapasitas disk.
Anda dapat menerapkan rekomendasi ini saat instance Cloud SQL cenderung
mendekati batas penyimpanan. Halaman ini menjelaskan cara kerja pemberi rekomendasi ini dan cara
menggunakannya.
Cara kerjanya
Pemberi rekomendasi out-of-disk Cloud SQL menganalisis tren penggunaan penyimpanan
selama 30 hari terakhir. Saat instance mendekati batas yang
kemungkinan akan kehabisan ruang penyimpanan dalam 1 hingga 30 hari ke depan, pemberi rekomendasi
akan membuat rekomendasi yang terkait untuk meningkatkan kapasitas penyimpanan secara manual, menyiapkan
kapasitas penyimpanan ke menambah atau mengosongkan ruang penyimpanan secara otomatis.
Di kartu Mencegah Periode nonaktif untuk instance SQL, klik Lihat semua.
gcloud
Untuk menampilkan rekomendasi disk yang kehabisan ruang penyimpanan dengan menggunakan gcloud, jalankan perintah
gcloud recommender recommendations list
sebagai berikut:
gcloud recommender recommendations list \
--project=PROJECT_ID \
--location=LOCATION \
--recommender=google.cloudsql.instance.RECOMMENDER
Ganti kode berikut:
PROJECT_ID: project ID Anda
LOCATION: Region, seperti us-central1
RECOMMENDER: ID pemberi rekomendasi sebagai OutOfDiskRecommender.
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/recommenders/google.cloudsql.instance.RECOMMENDER/recommendations
Ganti kode berikut:
PROJECT_ID: ID Project Anda.
LOCATION: Region, seperti us-central1.
RECOMMENDER: ID pemberi rekomendasi sebagai OutOfDiskRecommender.
Lihat insight dan rekomendasi mendetail
Anda dapat melihat insight dan rekomendasi mendetail tentang instance
yang hampir kehabisan kapasitas disk menggunakan konsol Google Cloud ,
gcloud, atau Recommender API.
Konsol
Untuk melihat insight dan rekomendasi mendetail tentang instance yang hampir
kehabisan kapasitas disk dengan menggunakan konsol Google Cloud , klik tombol rekomendasi
dalam daftar instance.
gcloud
Untuk melihat insight dan rekomendasi mendetail tentang instance yang hampir
menghabiskan kapasitas disk dengan menggunakan gcloud, jalankan
perintah gcloud recommender insights list
sebagai berikut:
gcloud recommender insights list \
--project=PROJECT_ID \
--location=LOCATION \
--insight-type=google.cloudsql.instance.INSIGHT_TYPE
Ganti kode berikut:
PROJECT_ID: ID Project Anda.
LOCATION: Region, seperti us-central1.
INSIGHT_TYPE: ID dari jenis insight DiskUsageTrendInsight.
API
Untuk melihat insight dan rekomendasi mendetail tentang instance yang hampir
kehabisan kapasitas disk menggunakan Recommendations API,
panggil insights.list
sebagai berikut:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT-ID/locations/LOCATION/insightTypes/google.cloudsql.instance.INSIGHT_TYPE/insights
Ganti kode berikut:
PROJECT_ID: ID Project Anda.
LOCATION: Region, seperti us-central1.
INSIGHT_TYPE: ID dari Jenis insight DiskUsageTrendInsight.
Tabel berikut berisi daftar insight dan rekomendasi yang dihasilkan oleh
pemberi rekomendasi out-of-disk Cloud SQL. Subjenis terlihat di hasil gcloud dan
API.
Insight
Rekomendasi
Berdasarkan tren penggunaan penyimpanan saat ini, instance kemungkinan kehabisan
ruang disk, yang dapat mengakibatkan periode nonaktif.
Subjenis: TRENDING_OUT_OF_DISK
Aktifkan pertumbuhan otomatis, tingkatkan kapasitas penyimpanan secara manual, atau kosongkan ruang disk.
Subjenis: ENABLE_AUTO_STORAGE_INCREASE
Menerapkan rekomendasi
Evaluasi rekomendasi dengan cermat dan lakukan salah satu tindakan berikut:
Untuk memeriksa rekomendasi, klik Lihat instance.
Banner akan muncul di bagian atas halaman yang memberikan rekomendasi.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)"]]