An operations team is updating telemetry collection for a fleet of Linux Compute Engine virtual machines hosting enterprise applications. The security policy requires collecting system memory (RAM) utilization metrics and ingesting custom application logs into Google Cloud Observability, while strictly adhering to Google-recommended practices and the principle of least privilege. Which TWO actions should the team take to complete this configuration?
- Install and configure the Google Cloud Ops Agent on each Compute Engine virtual machine instance.Answer
- Grant the VM service account the predefined roles Monitoring Metric Writer (`roles/monitoring.metricWriter`) and Logs Writer (`roles/logging.logWriter`).Answer
- CInstall the legacy Stackdriver Monitoring Agent and legacy Stackdriver Logging Agent as separate standalone services on each virtual machine.
- DGrant the VM service account the primitive Editor (`roles/editor`) role at the Google Cloud project level.
Answer
The team must install the unified Google Cloud Ops Agent on each VM instance and assign the predefined Monitoring Metric Writer and Logs Writer IAM roles to the VM service account.
Collecting OS-level metrics such as RAM utilization alongside application log files on Compute Engine requires deploying the unified Google Cloud Ops Agent. To allow the agent to write telemetry to Google Cloud Observability in accordance with security best practices, the VM service account must be granted specific predefined roles: Monitoring Metric Writer and Logs Writer.
Step-by-Step Solution
Key Concept
Compute Engine Observability & Least-Privilege Telemetry Roles
Estimated Time:2m 0s