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.)
- Install and configure the unified Google Cloud Ops Agent on each Compute Engine virtual machine instance.Cevap
- BInstall the legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent separately on each Compute Engine virtual machine instance.
- 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
- DAttach 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
Anahtar Kavram
Google Cloud Ops Agent installation and IAM minimal privilege configuration for Compute Engine observability