Google Distributed Cloud (GDC) air-gapped lets you track virtual machine (VM) performance
and resource utilization by using the VM metrics dashboard. You can view
project-specific metric graphs to inspect workload health and diagnose
infrastructure issues across your environment.

This document is for developers in the platform administrator or application
operator groups who monitor VM metrics by using dashboards in a
GDC environment. For more information, see
[Audiences for GDC air-gapped documentation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/resources/audiences.md.txt).
To learn more about collecting metrics, managing dashboards, or configuring
alert rules, see
[Observability monitoring and visualizing](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/observability-monitoring-and-visualizing)
and [Alerting](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/observability-alerting).

## Before you begin

### Request IAM roles

To monitor VM metrics with dashboards, contact your IAM Project Admin to request
the appropriate monitoring role. Review the list of
[project-level predefined roles for monitoring resources](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/obs-iam-permissions.md.txt#mon-roles-project)
for more information.

All roles must bind to the namespace of the project where the VM resides.

## VM dashboard

Access the VM-level metrics dashboard from the following address:

`https://GDC_HOST/PROJECT/grafana/d/vm-metrics/workload-vms`

- Replace `GDC_HOST` with your hostname.
- Replace `PROJECT` with the name of your project.

> [!NOTE]
> **Note:** GDC doesn't support guest environment metrics on Windows VMs.

The VM dashboard presents graphs that contain information regarding the following
for each VM in each of your project namespaces:

- [CPU](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/monitor/monitor-metrics.md.txt#cpu-graph)
- [Memory](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/monitor/monitor-metrics.md.txt#memory-graph)
- [Network](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/monitor/monitor-metrics.md.txt#network-graph)
- [Disk](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/monitor/monitor-metrics.md.txt#disk-graph)

These graph types are generated using the VM monitoring metrics. The metrics are
named and described according to their type, labels, and meanings.

In the dashboard view, from the selection box at the beginning of the page, which
is marked in the following image as "vm", choose the VM you want to observe. The
image shows that vm1 was selected.

![Choose the VM to view.](https://docs.cloud.google.com/static/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/images/vm_dropdown_selection.png)   

## CPU

View the CPU utilization - the amount of time that each vCPU spends in
different states. The graph displays information for each of the vCPUs specified
by your machine type.

![View CPU utilization](https://docs.cloud.google.com/static/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/images/vm_cpu_usage_graph.png "View CPU utilization.")

## Memory

From the memory graph, view attributes like the total memory allocated to the VM,
the amount of memory available, and the amount of memory your instances use.

![View memory allocation and usage](https://docs.cloud.google.com/static/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/images/vm_memory_graph.png "View memory allocation and usage.")

## Network

Use the **Network** page to view the following:

- The number of packets received from and sent to the network.
- The quantity of bytes received from and sent to the network.
- The number of receive and transmit packets that have been dropped on virtual network interface card (vNIC) interfaces.
- The network transmit error packet count.

![View network data](https://docs.cloud.google.com/static/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/images/vm_network_graph.png "View network data.")

## Disk

View the **Disk** page to see the following:

- A bytes count for reads from or writes to a disk
- A count of write or read IO operations.
- The cumulative time taken for a read or write operation:
  - The time the operation is in queue
  - The time spent actually executing the operation (disk busy)
- Disk flush request numbers, and the time spent on cache flushing.

![View disk data](https://docs.cloud.google.com/static/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/vms/images/vm_disk_graph.png "View disk data.")

## Metrics list

To view a list of metrics definitions, see
[Virtual Machine Management (VMM)](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/metrics-vmm.md.txt#metrics-list).