Question

Difficulty: MediumConfiguring Cloud Logging, Monitoring, and Operational Alerting

An operational engineering team is configuring Cloud Monitoring alerting policies for a fleet of Compute Engine virtual machines. They require alerts to trigger when memory utilization on any instance exceeds 80% for more than 10 minutes. However, when attempting to build the alert condition in the Cloud Monitoring console, the system memory utilization metric (agent.googleapis.com/memory/percent_used) is unavailable. Which action should the team take to enable this metric and successfully configure the alerting policy?

  1. Install and configure the Ops Agent on the Compute Engine instances to collect and report guest-OS system metrics to Cloud Monitoring.Answer
  2. B
    Assign the primitive Editor role to the Compute Engine default service account to grant permission to write custom metrics.
  3. C
    Submit a Google Cloud support ticket to request a regional quota increase for Monitoring API ingestion metric descriptors.
  4. D
    Grant the SRE team the Service Account Admin role on the Compute Engine service account to allow agent telemetry access.

Answer

Install and configure the Ops Agent on the Compute Engine instances to collect and report guest-OS system metrics to Cloud Monitoring.
Default Compute Engine metrics provided by the hypervisor only monitor external resource usage like CPU utilization and network throughput. Memory utilization is managed inside the guest operating system kernel. Installing the Ops Agent deploys a daemon inside the guest OS that continuously collects memory utilization data and pushes it to Cloud Monitoring under the metric namespace `agent.googleapis.com/memory/percent_used`.

Step-by-Step Solution

1
Identify why the target metric is missing in Cloud Monitoring.
Hypervisor-level monitoring only captures metrics visible from outside the VM (e.g., CPU utilization, network traffic, disk I/O). Detailed memory and internal disk utilization require in-guest metrics.
Cloud Monitoring cannot inspect guest OS RAM allocation without agent assistance.
2
Deploy the Google Cloud Ops Agent to the VM instances.
The Ops Agent gathers guest OS telemetry using OpenTelemetry for metrics and Fluent Bit for logging, publishing `agent.googleapis.com` metrics to Cloud Monitoring.
Installing the Ops Agent makes internal OS memory metrics accessible in Cloud Monitoring.
3
Construct the alerting policy using the newly available metric.
Configure the condition threshold for `agent.googleapis.com/memory/percent_used` exceeding 80% over a 10-minute duration.
With the metric populated, threshold condition evaluation functions as intended.

Key Concept

Compute Engine Guest-OS Telemetry & Ops Agent Monitoring
Rate this question