Your organization is deploying a fleet of Compute Engine virtual machines hosting a critical enterprise web application. To ensure effective operational monitoring, you need to collect guest OS-level metrics, such as memory utilization, as well as application log files from the file system into Cloud Observability. Which TWO configuration steps should you perform to enable this telemetry collection using Google recommended practices?
- Install and configure the unified Google Cloud Ops Agent on each Compute Engine instance.Cevap
- Attach a service account to the VM instances with the Monitoring Metric Writer (roles/monitoring.metricWriter) and Logs Writer (roles/logging.logWriter) predefined IAM roles.Cevap
- CInstall the standalone legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent packages on each VM instance.
- DGrant the primitive Editor (roles/editor) role to the attached VM service account at the GCP project level.
Cevap
Installing the unified Google Cloud Ops Agent on the VM instances and assigning the Monitoring Metric Writer and Logs Writer predefined roles to the VM service account.
To capture guest OS-level metrics like RAM usage alongside custom log files, Google Cloud requires installing the unified Ops Agent on Compute Engine instances. Furthermore, the attached service account must possess specific predefined roles (`roles/monitoring.metricWriter` and `roles/logging.logWriter`) to transmit telemetry data securely following least-privilege security practices.
Adım Adım Çözüm
Anahtar Kavram
Compute Engine Telemetry Collection with Google Cloud Ops Agent