An e-commerce platform runs its order-processing microservices across a fleet of Compute Engine virtual machines. The operations lead notices that standard Compute Engine CPU metrics do not provide visibility into OS-level memory utilization or custom file-based application logs. The team must configure telemetry collection and ensure the instances have appropriate access permissions. Which configuration steps should the operations team perform?
- Install the unified Google Cloud Ops Agent on the Compute Engine instances and attach a service account granted the Monitoring Metric Writer and Logs Writer roles.Answer
- BInstall the legacy Stackdriver Monitoring and Logging agents separately on the instances and assign the Editor primitive role to the default Compute Engine service account.
- CInstall the unified Google Cloud Ops Agent on the instances and assign the Project Owner primitive role to the service account attached to the virtual machines.
- DInstall the unified Google Cloud Ops Agent on the Compute Engine instances, but enable the Stackdriver Monitoring API at the Organization level instead of the host project.
Answer
Install the unified Google Cloud Ops Agent on the Compute Engine instances and attach a service account granted the Monitoring Metric Writer and Logs Writer roles.
The correct answer specifies installing the unified Google Cloud Ops Agent, which is Google's standard agent for gathering memory, swap, and disk metrics alongside log files from virtual machines. Additionally, attaching a service account with predefined roles (Monitoring Metric Writer and Logs Writer) enforces the security principle of least privilege.
Step-by-Step Solution
Key Concept
Unified Ops Agent Telemetry and Least Privilege IAM Roles