A cloud engineering team needs to capture memory utilization metrics and custom file logs from a fleet of Compute Engine virtual machines, sending the logs to a central security project. Which TWO actions should the team perform to meet these requirements using Google Cloud best practices? (Select TWO)
- Install and configure the Google Cloud Ops Agent on the Compute Engine virtual machines.Answer
- Grant the Logs Writer role (roles/logging.logWriter) on the central security project to the service account attached to the Compute Engine instances.Answer
- CInstall the legacy Stackdriver Monitoring Agent on the virtual machines to collect memory telemetry.
- DGrant the Owner primitive role (roles/owner) on the central security project to the Compute Engine default service account.
Answer
The correct actions are installing the Google Cloud Ops Agent on the virtual machines and granting the Logs Writer role (roles/logging.logWriter) on the target central project to the VM service account.
Deploying the Ops Agent provides a unified solution for gathering guest memory metrics and custom log files from Compute Engine VMs. Assigning the predefined Logs Writer role on the destination project adheres to the principle of least privilege while permitting log ingestion.
Step-by-Step Solution
Key Concept
Google Cloud Ops Agent deployment and least-privilege IAM configuration for centralized Cloud Logging