This page provides details on how to monitor the usage and performance of Backup and DR Service resources in your Google Cloud project.
Backup and DR Service uses Cloud Monitoring to provide visibility into the usage, performance, and overall health of the resources. You can use Cloud Monitoring to create custom charts and dashboards to visualize the different performance metrics and resource usage of Backup and DR Service resources. Cloud Monitoring also lets you configure alerts and alert policies for these metrics. You can also set up an alert to check if the total data processed exceeds a specified threshold value. For information about configuring alerts, see Alerts .
You can visualize your Backup and DR Service metrics and data using the following Cloud Monitoring tools:
Required IAM role
The following permissions are required for metrics operations. Learn how to grant an IAM role .
- Monitoring Viewer ( roles/monitoring.viewer) role to view metrics in Cloud Monitoring
- Monitoring Editor ( roles/monitoring.editor) role to access metrics dashboard and set alerts in Cloud Monitoring
Available Backup and DR Service resource metrics
The following metrics are available for Backup and DR Service in the Google Cloud console.
Metric for backup vault consumption
In Cloud Monitoring, the monitored resource type 
for the following metrics is the backup vault ( /backupdr.googleapis.com/BackupVault 
)
Metric label:
- backup_schedule_type: Represents if the resource type is protected using a backup plan or backup template.
- resource_type: Type of resource that you want to see the storage consumption details. This can be a Compute Engine instance, an Oracle database, a Microsoft SQL server, or a Google Cloud VMware Engine.
Metrics for the resources protected using backup template
In Cloud Monitoring, the monitored resource type 
for Backup and DR Service is the management console ( /backupdr.googleapis.com/managementconsole 
).
Metric label:
- pool_name: Name of the storage pool. For example, act_pri_pool000.
- pool_usage: Type of usage. It can be free or used.
- pool_type: Type of storage pool. It can be snapshot or primary.
Metric label: You can use the following labels for backup/recovery appliance vDisk utilization metrics to filter data:
- v_disk_usage: Display the state of the vDisk. It can be free or used.
- backup_recovery_appliance_name: The name of the backup/recovery appliance.
Note: The OnValut pools metric doesn't include backup vault data.
Metric label: You can use the following labels for OnVault pool usage metrics to filter data:
- pool_name: Name of the storage pool. For example, act_pri_pool000.
- backup_recovery_appliance_name: The name of the backup/recovery appliance.
Note: This doesn't include data protected for Google Cloud VMware Engine nodes.
Metric label: You can use the following labels for protected data volume metrics to filter data:
- resource_type: Type of resource associated with the job. For example, Compute Engine instance, file system, SQL instance, or consistency group.
- backup_recovery_appliance_name: The name of the backup/recovery appliance.
Note: This doesn't include data protected for Google Cloud VMware Engine nodes.
Metric label: You can use the following labels for protected resources count metrics to filter data:
- resource_type: Type of resource associated with the job. For example, Compute Engine instance, file system, or SQL instance.
Metric label: You can use the following labels for job trend metrics to filter data:
- job_status: Displays the status of a job. It can be successful, canceled, failed, not run, or successfulwithwarnings.
- job_type: Type of job. For example, snapshot, expiration, or mount.
- resource_type: Type of resource associated with the job. For example, Compute Engine instance, file system, or Microsoft SQL Server instance.
- backup_recovery_appliance_name: The name of the backup/recovery appliance.
Access metrics using sample dashboards
Backup and DR Service provides sample dashboards with charts containing metrics relevant to usage, performance, and the overall health of the resources. You can import and install these sample dashboards in Cloud Monitoring to create custom dashboards from.
To install a sample dashboard, do the following:
- In the Google Cloud console, go to the Monitoring page:
- In the navigation pane, select Dashboards, and go to the Sample librarytab.
- In Categories, select Backup and DR.
- From the list of samples, select Backup and DR Monitoringand click Import.
-  Click Confirm. The dashboard is imported and listed in the Dashboard listtab. After importing the sample dashboard, you can view and edit the Backup and DR Service metrics in the dashboard. For more information about installing sample dashboards, see Install sample dashboards . 
Access metrics using custom dashboards
In your Google Cloud project, you can create custom monitoring dashboards for your Backup and DR Service resources by doing the following:
- In the Google Cloud console, go to the Cloud Monitoring > Dashboard Overview page:
- Click Create dashboard.
- Click Add widget.
- Optional: Modify the name of the dashboard.
- From the Add widgetmenu, select a visualization type.
- In the Configure widget, do the following: - From the Select a metricmenu, choose the metrics that you want to visualize.
- Click Apply.
 
- Click Apply.
For more information about custom dashboards, see Create and manage custom dashboards .
Access Backup and DR Service resource metrics using Metrics explorer
The Cloud Monitoring Metrics explorer helps you build temporary metric charts to visualize the available resource metrics for your Google Cloud project. Once you have created a metric chart, you can also save it to a custom monitoring dashboard. For more information, see Select metrics when using Metrics explorer .
To create a chart using the Backup and DR Service resource metrics, do the following:
- In the Google Cloud console, go to the Cloud Monitoring > Metrics explorer page:
- In the Select a metricpane, expand the Metricmenu.
- Enter management consolein the filter bar and then use the submenus to select a specific resource type and metric .- In the Active metric categoriesmenu, select OnVault_pools.
- In the Active metricsmenu, select an OnVault pool usagemetric.
- Click Apply.
 
- Optional: Change the settings in the Displaypane: - For quota and other metrics that report one sample per day, set the Widget typeto Stacked bar chart.
- For distribution valued metrics, click the Widget typemenu and select Heatmap chart.
 
- Click Save chart.
- Enter a name for the chart in the Chart titlefield.
- Choose a dashboard from an existing dashboard or create a new dashboard.
-  Click Save chart. You can also select filters, group by metric labels, perform aggregations, and select chart viewing options using the Metrics explorer. For more information, see Create charts with Metrics explorer . 

