View virtual machine metrics

Turn on monitoring for a virtual machine, and read its CPU, memory, disk, and network charts over the last hour, day, or week.

Use the Monitoring tab of an instance to turn monitoring on or off and to chart the instance's metrics.

Before you begin

  • To view metrics, you need any role with Read access to Compute / Instances on the project or its subscription, such as Reader. To turn monitoring on or off, you need the Owner or Contributor role, or a custom role with Manage access to Compute / Instances.
  • Monitoring is billed per hour while it's on, when it has a price in your region. See Billing.

Turn on monitoring

In the console, go to ComputeInstances, and select the instance.

Select the Monitoring tab.

Select Turn on monitoring, or turn on Monitoring at the top of the tab.

If monitoring has a price in your region, the console asks you to confirm: in Turn on monitoring?, select Turn on monitoring.

The text under the toggle tells you whether monitoring has a price in your region. You can also turn on monitoring when you create the instance, with Enable monitoring on the Advanced step. See Create a virtual machine.

To turn monitoring off, turn off Monitoring. While monitoring is off, the instance's metrics aren't shown or billed, and metric alert rules skip the instance. A metric alert that's firing for the instance resolves, and its channels are notified once.

Read the charts

On the Monitoring tab, select a time range: 1h, 24h, or 7d. The default is the last hour.

Hover over a chart to read the value of each line at a point in time.

The tab refreshes the charts every minute while it's open.

ChartWhat it showsUnit
CPU utilizationThe time the instance's vCPUs ran, as a share of its vCPU count.%
Memory utilizationThe memory in use, as a share of the memory available to the guest.%
Disk throughputData read and written, per disk.MB/s
Disk IOPSRead and write operations, per disk.IOPS
Disk latencyAverage time per read and per write operation, per disk.ms
Network throughputTraffic received and sent, per network interface.Mbps
Network packetsPackets received and sent, per network interface.packets per second
Network errors & dropsReceive and transmit errors and drops, per network interface.per second
Page cacheMemory that the guest uses as disk cache.MB
Swap in / outMemory swapped in and out by the guest.bytes per second
  • Disks and interfaces. Each disk is its own line, labeled with its device name and, for a Block Storage volume, the volume ID. Each network interface is labeled with its MAC address.
  • Resolution. A range of 1 hour has one point per minute, 24 hours one point per 5 minutes, and 7 days one point per 30 minutes. Rates, such as CPU, disk, and network figures, are averaged over at least the last 2 minutes at each point.
  • Gaps. The charts show no data for the times when monitoring was off. After you turn monitoring on, the charts start from that moment.
The CPU utilization chart over the last 24 hours, on a scale from 0 to 100 percent, with the note on how CPU is measured underneath.
Console screenshot · illustrative data

How CPU is measured

CPU % is measured on the hypervisor from vCPU time; under heavy network or interrupt load it can read higher than the guest operating system shows.
The Network throughput chart with one line for traffic in and one for traffic out, both labeled with the interface's MAC address.
Console screenshot · illustrative data

Create an alert from a chart

Charts with a metric that alert rules can watch show Create alert. The disk latency, page cache, and swap charts don't, because those metrics can't be alerted on.

On the chart, select Create alert.

Complete the alert rule form, and select Create rule. See Create alert rules.

The form opens with VM metric selected, the chart's metric, and a threshold above the highest value in view:

  • For CPU and memory utilization: 10 points above the highest value, rounded up to a multiple of 5, but at least 80 % and at most 95 %. With no values in view, 80 %.
  • For other metrics: one and a half times the highest value, rounded up to two significant digits. With no values in view, or only zeros, 1.

A chart with several lines starts the form with the first one, for example read throughput. You can choose another metric in the form. The rule doesn't target the instance by its ID: the form offers the instance's tags as tag selector pairs that you can add with one click.

Result

With monitoring on, the Monitoring tab charts the instance's metrics from the moment you turned it on, and refreshes them every minute. From that moment, monitoring is billed for the instance, when it has a price in your region.

Troubleshooting

MessageCauseResolution
Monitoring is offMonitoring is off for the instance.Select Turn on monitoring.
No metrics yetThe instance isn't running on the cloud yet.Wait until the instance's creation finishes.
No samples in this window yet.The range has no samples, for example right after the instance was created.Wait a few minutes, or select a longer range.
Metrics are temporarily unavailableThe metrics store can't be reached.Try again shortly.
Couldn’t load metricsThe request for the metrics failed.Reload the page.

If the memory chart is empty: No memory data. Memory usage needs the guest to report available memory through a current balloon driver — on Windows, install a recent virtio balloon driver and its service.

On this page