本頁面說明如何查看 Cloud Logging 為備份/復原裝置建立的備份和 DR 服務儲存空間資源使用率記錄。儲存空間資源使用率記錄可提供應用程式和虛擬機器 (VM) 執行的資料保護活動相關重要洞察資料。這些記錄包含受保護資料的詳細資訊。
權限與角色
您必須具備 IAM 權限 roles/logging.viewer,才能查看儲存空間資源使用率記錄。您可以透過「記錄檢視者」角色,取得唯讀存取權,查看指定專案中所有備份/復原裝置的儲存空間資源使用率記錄。如要進一步瞭解適用於儲存空間資源使用率記錄資料的 IAM 權限和角色,請參閱「使用身分與存取權管理功能控管存取權」。
查看儲存空間資源使用率記錄
您可以使用 Google Cloud 控制台和 Google Cloud CLI,在 Cloud Logging 中查看備份和 DR 服務儲存空間資源使用率記錄。
控制台
在 Google Cloud 控制台中,您可以使用「Logs Explorer」擷取備份/復原裝置的備份和 DR 服務儲存空間資源使用率記錄項目:
在 Google Cloud 控制台中,依序前往「Logging」 >「Logs Explorer」。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThis page explains how to access and interpret Backup and DR Service storage resource utilization logs in Cloud Logging, which detail data protection activities for applications and virtual machines.\u003c/p\u003e\n"],["\u003cp\u003eYou need the \u003ccode\u003eroles/logging.viewer\u003c/code\u003e IAM permission to view these logs, granting read-only access to storage resource utilization data for all backup/recovery appliances in your project.\u003c/p\u003e\n"],["\u003cp\u003eLogs can be accessed through the Google Cloud console's Logs Explorer by selecting the \u003ccode\u003egcb_backup_storage_utilization\u003c/code\u003e log name or via the gcloud CLI with a specific command to read the log entries.\u003c/p\u003e\n"],["\u003cp\u003eEach log entry includes fields like Appliance name, Storage type, Pool name, Total capacity, Used capacity, Appliance ID, and Utilization %, providing comprehensive information about storage resource usage.\u003c/p\u003e\n"],["\u003cp\u003eCustom queries can be written to view specific logs, such as those for a particular appliance, pool, storage type, or to filter by utilization percentage, enabling detailed analysis of storage resource utilization.\u003c/p\u003e\n"]]],[],null,["# Storage resource usage logs\n\nThis page explains how to view the Backup and DR Service storage resource\nutilization logs created by Cloud Logging for backup/recovery appliances.\nThe storage resource utilization logs provide essential insights into the data\nprotection activities performed by applications and virtual machines (VMs).\nThese logs include detailed information about the amount of protected data.\n\nPermissions and roles\n---------------------\n\nYou need the [IAM](/iam/docs) permission `roles/logging.viewer` to view the\nstorage resource utilization logs. The Logs Viewer role gives you\nread-only access to view storage resource utilization logs of all\nbackup/recovery appliances in the specified project. For more information about\nthe IAM permissions and roles that apply to storage resource utilization logs\ndata, see [Access control with IAM](/logging/docs/access-control).\n\nView storage resource utilization logs\n--------------------------------------\n\nYou can view Backup and DR Service storage resource utilization logs in Cloud Logging\nby using the Google Cloud console and the Google Cloud CLI. \n\n### Console\n\nIn the Google Cloud console, you can use the **Logs Explorer** to retrieve the\nBackup and DR Service storage resource utilization log entries for your backup/recovery appliances:\n\n1. In the Google Cloud console, go to the **Logging** \\\u003e **Logs Explorer**.\n2. Select an existing Cloud project.\n3. In the **Query builder** pane, select **gcb_backup_storage_utilization** from the **Select Log name** drop-down.\n\n### gcloud\n\nThe Google Cloud CLI provides a command-line interface to the Cloud Logging API.\nTo read your log entries of backup/recovery appliances in a project, run the\nfollowing command: \n\n ```sh\n gcloud logging read \"logName : projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\" --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n ```\n\nStorage resource utilization log format\n---------------------------------------\n\nBackup and DR Service storage resource utilization log entries include the following fields:\n\nThe following sample is an example log entry logged on a backup/recovery appliance `appliance-test5-64573`. \n\n {\n \"insertId\": \"3302897_145859162970\",\n \"jsonPayload\": {\n \"appliance_id\": \"145859162970\",\n \"appliance_name\": \"appliance-test5-64573\"\n \"pool_name\": \"act_per_pool000\",\n \"storage_type\": \"perf\",\n \"total_capacity_in_gib\": 4075.52,\n \"used_capacity_in_gib\": 163.84,\n \"utilization_percentage\": 4.020100502509347,\n },\n \"resource\": {\n \"type\": \"backupdr.googleapis.com/ManagementConsole\",\n \"labels\": {\n \"location\": \"us-central1\",\n \"resource_container\": \"projects/xxxxxxxxxxxx\",\n \"management_server_id\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n }\n },\n \"timestamp\": \"2024-03-12T03:03:02.170Z\",\n \"logName\": \"projects/project_ID/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\",\n \"receiveTimestamp\": \"2024-03-12T03:03:06.740899360Z\"\n }\n\nSample queries\n--------------\n\nTo view selected logs, you can write custom storage resource utilization queries in the query section\n\nUse the following query to view all the storage resource utilization logs associated with backup/recovery appliances for a given \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\"\n\nUse the following query for specific storage resource details that run for a specific resource. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\"\n jsonPayload.appliance_name=\"\u003cvar translate=\"no\"\u003eappliance_name\u003c/var\u003e\"\n\nUse the following query for storage resource details that run for applications for a specific pool. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\"\n jsonPayload.pool_name=\"\u003cvar translate=\"no\"\u003epool_name\u003c/var\u003e\"\n\nUse the following query for specific storage types. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\"\n jsonPayload.storage_type=(\"\u003cvar translate=\"no\"\u003estorage_type\u003c/var\u003e\")\n\nUse the following query to find applications with utilization percentage \\\u003c 50%. \n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/backupdr.googleapis.com%2Fgcb_backup_storage_utilization\"\n jsonPayload.utilization_percentage \u003c 50\n\nWhat's next\n-----------\n\n- To configure log-based alerts for Backup and DR Service, create a log query, using the [filter storage utilization logs](#log), and then [Configure log-based alerts](/backup-disaster-recovery/docs/configure-alerts)."]]