An infrastructure team needs to collect OS-level memory metrics and system logs from a fleet of Compute Engine virtual machines running Linux. The solution must align with Google-recommended security and observability best practices. Which TWO actions should you perform?
- Install and configure the Google Cloud Ops Agent on each Compute Engine instance.Cevap
- Assign the Monitoring Metric Writer and Logs Writer roles to the service account attached to the Compute Engine instances.Cevap
- CInstall the legacy Stackdriver Monitoring agent and Stackdriver Logging agent separately on each virtual machine instance.
- DGrant the primitive Editor role to the Compute Engine default service account to authorize metric and log submission.
Cevap
To collect system memory metrics and logs securely according to Google Cloud best practices, you should install the unified Google Cloud Ops Agent on each VM instance and ensure the VM's service account has the specific predefined roles: Monitoring Metric Writer and Logs Writer.
The unified Google Cloud Ops Agent is Google's recommended agent for collecting telemetry (metrics and logs) from Compute Engine instances. To write this telemetry data to Google Cloud Observability tools safely, the VM's associated service account only requires the specific predefined roles Monitoring Metric Writer and Logs Writer.
Adım Adım Çözüm
Anahtar Kavram
Compute Engine telemetry collection requires installing the Google Cloud Ops Agent and assigning minimal predefined IAM roles to the instance service account.