本页介绍了如何查看 Cloud Logging for Backup/Recovery Appliance 创建的备份和灾难恢复服务存储资源利用率日志。存储资源利用率日志可提供有关应用和虚拟机 (VM) 执行的数据保护活动的重要数据洞见。这些日志包含有关受保护数据量的精细信息。
权限和角色
您需要拥有 IAM 权限 roles/logging.viewer 才能查看存储资源利用率日志。借助“日志查看器”角色,您可以查看指定项目中所有备份/恢复设备的存储资源使用情况日志,但只能进行查看,如需详细了解适用于存储资源使用情况日志数据的 IAM 权限和角色,请参阅使用 IAM 进行访问权限控制。
查看存储资源利用率日志
您可以使用 Google Cloud 控制台和 Google Cloud CLI 在 Cloud Logging 中查看备份和灾难恢复服务存储资源利用率日志。
控制台
在 Google Cloud 控制台中,您可以使用日志浏览器检索备份/恢复设备的备份和灾难恢复服务存储资源利用率日志条目:
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):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)."]]