Soru

Zorluk: Çok zorMonitoring and Logging

A Cloud Engineer must configure system telemetry for a fleet of Compute Engine virtual machines (VMs) to ingest custom application logs and capture system-level metrics, such as RAM/memory utilization, which are not collected by default compute hypervisor metrics. The implementation must follow Google Cloud security best practices regarding agent selection and least-privilege access control for telemetry collection. Which TWO actions should the Cloud Engineer perform?

  1. Install and configure the unified Google Cloud Ops Agent on each Compute Engine VM instance.Cevap
  2. Grant the service account attached to the VM instances the predefined Monitoring Metric Writer (`roles/monitoring.metricWriter`) and Logs Writer (`roles/logging.logWriter`) IAM roles.Cevap
  3. C
    Install the legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent as separate daemon packages on each Compute Engine instance.
  4. D
    Grant the service account attached to the VM instances the primitive Editor (`roles/editor`) role at the Google Cloud project level.

Cevap

The correct actions are installing the unified Google Cloud Ops Agent on each VM instance and granting the VM's service account the predefined Monitoring Metric Writer and Logs Writer IAM roles.
To collect extended VM metrics (like RAM/memory utilization) and application logs, the unified Google Cloud Ops Agent must be installed on the instances. To permit telemetry submission under least privilege, the attached service account requires the predefined `roles/monitoring.metricWriter` and `roles/logging.logWriter` roles.

Adım Adım Çözüm

1
Identify the recommended GCP telemetry collection agent for Compute Engine VMs.
Selected the unified Google Cloud Ops Agent, which handles both logging and extended system metrics like memory usage.
Legacy Stackdriver Monitoring and Logging agents are deprecated and should not be deployed for new operations.
2
Determine the necessary IAM roles for publishing telemetry to Cloud Operations suite.
Assigned `roles/monitoring.metricWriter` and `roles/logging.logWriter` to the service account.
Predefined roles strictly enforce least-privilege access control compared to broad primitive roles like Editor or Owner.

Anahtar Kavram

Unified Ops Agent deployment and least-privilege telemetry IAM role assignment
Bu soruyu puanla