Soru

Zorluk: ZorMonitoring and Logging

A company is migrating a fleet of Linux Compute Engine virtual machines to Google Cloud. The operations team needs to collect system telemetry—including OS-level memory utilization, detailed disk metrics, and system log entries—and send this telemetry to Cloud Monitoring and Cloud Logging. The implementation must follow Google-recommended best practices for agent deployment and adhere to the principle of least privilege for access control. Which TWO actions must you perform to satisfy these requirements? (Select TWO.)

  1. Install and configure the unified Google Cloud Ops Agent on each Compute Engine virtual machine instance.Cevap
  2. B
    Install the legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent separately on each Compute Engine virtual machine instance.
  3. Attach a service account to the virtual machine instances and grant it the Monitoring Metric Writer (roles/monitoring.metricWriter) and Logs Writer (roles/logging.logWriter) predefined IAM roles.Cevap
  4. D
    Attach a service account to the virtual machine instances and grant it the primitive Editor (roles/editor) role on the hosting project.

Cevap

To collect system memory utilization and system logs following Google Cloud best practices with least privilege access, you must install the unified Google Cloud Ops Agent on each Compute Engine VM instance and attach a service account assigned the Monitoring Metric Writer (roles/monitoring.metricWriter) and Logs Writer (roles/logging.logWriter) predefined roles.
The Google Cloud Ops Agent combines log ingestion and system metric collection (including memory and disk utilization) into a single, unified agent recommended by Google Cloud. For authentication and authorization, assigning the predefined roles Monitoring Metric Writer (roles/monitoring.metricWriter) and Logs Writer (roles/logging.logWriter) to the instance service account provides the minimal necessary permissions required to write observability data.

Adım Adım Çözüm

1
Select the correct telemetry agent software for Compute Engine instances.
Identify that the unified Google Cloud Ops Agent is the official replacement for legacy agents and is required to capture extended OS-level metrics like memory usage alongside logs.
Legacy agents are deprecated and do not represent current Google Cloud best practices.
2
Determine the minimum required IAM permissions for telemetry submission.
Identify the predefined roles Monitoring Metric Writer (roles/monitoring.metricWriter) and Logs Writer (roles/logging.logWriter).
These predefined roles allow the service account attached to the VM instance to write metrics and logs to Google Cloud Observability without over-granting administrative permissions.

Anahtar Kavram

Google Cloud Ops Agent installation and IAM minimal privilege configuration for Compute Engine observability
Bu soruyu puanla