A DevOps team manages a fleet of Compute Engine Linux virtual machines hosting a critical business application. The team needs to capture guest operating system memory utilization metrics and ingest custom application log files stored at `/var/log/app-service.log` into Google Cloud Observability. Which solution follows Google recommended practices to collect both the memory telemetry and log files?
- Install and configure the unified Google Cloud Ops Agent on each virtual machine instance.Answer
- BInstall both the legacy Cloud Monitoring agent and legacy Cloud Logging agent on each virtual machine instance.
- CGrant the Compute Instance Admin (v1) role to the default Compute Engine service account to enable hypervisor-level memory and file log collection.
- DEnable the Cloud Logging API in the organization node settings to automatically stream OS-level memory metrics and internal VM file paths.
Answer
Installing and configuring the unified Google Cloud Ops Agent on each Compute Engine virtual machine instance is the Google recommended solution.
The Google Cloud Ops Agent is the primary unified agent for Compute Engine virtual machines. It collects system metrics such as CPU, disk, swap, and memory utilization, alongside system and custom log files. Using the Ops Agent is the Google recommended practice for VM guest telemetry.
Step-by-Step Solution
Key Concept
Google Cloud Ops Agent Deployment
Estimated Time:1m 30s