Question

Difficulty: MediumMonitoring, Logging, and Observability Integration

A financial technology company hosts a legacy transaction processing application on Compute Engine Virtual Machines (VMs). The operations team must collect detailed system memory metrics and custom application logs, ensuring that telemetry data is securely ingested into Cloud Monitoring and Cloud Logging following Google Cloud security best practices. Which architectural approach should the Cloud Architect recommend?

  1. Install the Google Cloud Ops Agent on the Compute Engine instances and attach a dedicated service account configured with minimal predefined roles for log ingestion and metric writing.Answer
  2. B
    Install the Google Cloud Ops Agent on the Compute Engine instances and assign the Editor primitive IAM role to the default Compute Engine service account to simplify telemetry authorization.
  3. C
    Install the Google Cloud Ops Agent on the Compute Engine instances and configure an aggregate Cloud Logging exclusion filter that drops all logs with severity level ERROR and above to reduce telemetry volume.
  4. D
    Configure identity permissions for metric write access and rely solely on IAM permissions without establishing VPC Service Controls perimeters to prevent unauthorized exfiltration of operational telemetry.

Answer

Install the Google Cloud Ops Agent on the Compute Engine instances and attach a dedicated service account configured with minimal predefined roles for log ingestion and metric writing.
Installing the Google Cloud Ops Agent provides unified logging and metrics collection (including memory utilization) on Compute Engine VMs. Attaching a dedicated service account with fine-grained predefined roles ensures compliance with security best practices and the principle of least privilege.

Step-by-Step Solution

1
Identify telemetry collection requirements for Compute Engine instances
Determine that both custom application logs and OS-level system metrics (such as memory) require the Google Cloud Ops Agent.
Compute Engine default metrics do not capture internal OS memory or custom log files without an agent installed.
2
Evaluate security and IAM authorization requirements
Select a dedicated service account equipped with standard IAM roles (`roles/logging.logWriter` and `roles/monitoring.metricWriter`).
This adheres to Google Cloud least privilege recommendations instead of using primitive roles.

Key Concept

Monitoring, Logging, and Observability Integration
Rate this question