監控儲存空間集區使用率對於維護集區磁碟資源至關重要。您可以使用 Google Cloud 控制台的「監控」分頁標籤,查看 Compute Engine 提供的儲存空間資源群組指標概略資料。這個分頁會使用指標資料提供預先定義的資訊主頁,方便您監控儲存體資源池,並針對儲存體資源池的配置資源做出明智的決策。
根據預設,「監控」頁面會顯示下列磁碟容量、IOPS 和總處理量的圖表:
- 已佈建容量、已佈建 IOPS 或已佈建處理量:為儲存空間集區佈建的總量。
- 已使用容量、IOPS 或處理量:儲存空間集區中磁碟的使用量。
- 容量使用率、IOPS 使用率或處理量使用率 (%):已使用總量相對於已佈建總量的百分比。
- 已佈建的磁碟總容量、已佈建的磁碟總 IOPS 和已佈建的磁碟總處理量:儲存空間集區中,所有磁碟的已佈建總容量、IOPS 或處理量。
- 過度佈建的容量、IOPS 或處理量 (%):已佈建的磁碟總容量相對於已佈建容量的百分比。
您也可以自訂預先定義的資訊主頁,只查看所需的特定指標。
事前準備
-
如果尚未設定,請先設定驗證機制。驗證是指驗證身分,以便存取 Google Cloud 服務和 API 的程序。如要在本機開發環境中執行程式碼或範例,您可以選取下列任一選項,向 Compute Engine 進行驗證:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
-
存取儲存空間集區監控頁面
您可以在 Google Cloud 控制台中查看監控頁面。
前往 Google Cloud 控制台中的「Storage pools」(儲存空間資源池) 頁面。
按一下儲存體池名稱,開啟「Details」頁面。
按一下「監控」分頁標籤,即可顯示儲存空間叢集的監控資訊主頁。
選用步驟:選擇下列任一選項,將一小時的預設時間範圍重設為您要監控的時間範圍:
- 6 小時
- 1 天
- 1 週
- 1 個月
- 6 週
- 自訂日期或時間範圍
自訂儲存空間集區資訊主頁
請按照下列操作說明修改儲存空間資源池資訊主頁上顯示的圖表。
- 前往儲存空間集區「監控」頁面。
如要變更預設圖表,請依序點選「query_stats」「探索資料」。
系統會開啟「探索」頁面,您可以在其中建立自訂監控圖表或表格。如要瞭解如何為特定指標建立圖表,請參閱「將單一指標類型製成圖表」。
建立自訂圖表或表格後,您可以將結果儲存至新的或現有自訂資訊主頁。
如要進一步瞭解自訂資訊主頁,請參閱「查看及自訂 Google Cloud 資訊主頁」。
或者,您也可以按一下 查看及自訂 Google Cloud 資訊主頁」一文的操作說明,進一步自訂資訊主頁。
「更多圖表選項」,然後點選「新增至自訂資訊主頁」,將儲存空間叢集監控圖表新增至自訂資訊主頁。接著,您可以按照「
設定指標快訊
請按照下列操作說明,針對儲存空間資源池資訊主頁顯示的指標資料建立快訊。
- 前往儲存空間集區「監控」頁面。
- 按一下「建立快訊政策」。系統隨即會顯示「Create alerting policy」頁面。設定快訊政策的參數。如要瞭解如何設定快訊政策,請參閱「建立快訊政策」。