Question

Difficulty: MediumMonitoring and Logging

A cloud engineering team needs to capture memory utilization metrics and custom file logs from a fleet of Compute Engine virtual machines, sending the logs to a central security project. Which TWO actions should the team perform to meet these requirements using Google Cloud best practices? (Select TWO)

  1. Install and configure the Google Cloud Ops Agent on the Compute Engine virtual machines.Answer
  2. Grant the Logs Writer role (roles/logging.logWriter) on the central security project to the service account attached to the Compute Engine instances.Answer
  3. C
    Install the legacy Stackdriver Monitoring Agent on the virtual machines to collect memory telemetry.
  4. D
    Grant the Owner primitive role (roles/owner) on the central security project to the Compute Engine default service account.

Answer

The correct actions are installing the Google Cloud Ops Agent on the virtual machines and granting the Logs Writer role (roles/logging.logWriter) on the target central project to the VM service account.
Deploying the Ops Agent provides a unified solution for gathering guest memory metrics and custom log files from Compute Engine VMs. Assigning the predefined Logs Writer role on the destination project adheres to the principle of least privilege while permitting log ingestion.

Step-by-Step Solution

1
Select the correct telemetry agent for Compute Engine memory and log collection.
Identify the Google Cloud Ops Agent as the single unified agent required for system metrics and log collection.
Legacy agents are deprecated and do not support modern unified configuration patterns.
2
Determine the minimal required IAM role for sending logs across projects.
Select the predefined Logs Writer role (roles/logging.logWriter) on the central log storage project.
Security best practices demand using targeted predefined roles over broad primitive roles like Owner.

Key Concept

Google Cloud Ops Agent deployment and least-privilege IAM configuration for centralized Cloud Logging
Rate this question