Soru

Zorluk: ZorMonitoring and Logging

A cloud administrator is tasked with setting up system memory and disk utilization telemetry for a newly deployed fleet of Linux Compute Engine virtual machines. Upon viewing the Cloud Monitoring dashboard, the administrator notices that memory utilization metrics are absent. The administrator must collect these operating system level metrics and send them to Cloud Monitoring while strictly adhering to Google-recommended practices and the principle of least privilege. Which approach should the administrator take?

  1. Install the Google Cloud Ops Agent on each Compute Engine instance and ensure the attached service account is granted the Monitoring Metric Writer role (roles/monitoring.metricWriter).Cevap
  2. B
    Install the legacy Stackdriver Monitoring agent on each Compute Engine instance and grant the attached service account the Monitoring Editor role (roles/monitoring.editor).
  3. C
    Install the Google Cloud Ops Agent on each Compute Engine instance and assign the Compute Engine default service account the Owner primitive role (roles/owner).
  4. D
    Enable the Cloud Monitoring API at the organization level and grant the Monitoring Metric Writer role (roles/monitoring.metricWriter) at the organization node while revoking all permissions on individual Compute Engine instances.

Cevap

Install the Google Cloud Ops Agent on each Compute Engine instance and ensure the attached service account is granted the Monitoring Metric Writer role (roles/monitoring.metricWriter).
To collect operating system metrics such as memory utilization, virtual machines require the Google Cloud Ops Agent. The agent runs inside the OS and transmits time-series data using the VM's service account. Providing the service account with the predefined Monitoring Metric Writer role (roles/monitoring.metricWriter) adheres to least privilege by allowing only metric writes without granting broader administrative capabilities.

Adım Adım Çözüm

1
Identify the correct telemetry collection agent for Compute Engine virtual machines.
Recognize that OS-level metrics like RAM/memory utilization are not collected by default hypervisor checks and require the Google Cloud Ops Agent (the unified successor to legacy agents).
Google Cloud Ops Agent combines logging and metrics telemetry into a single agent optimized for Compute Engine VMs.
2
Determine the minimal required Identity and Access Management (IAM) role for telemetry ingestion.
Select the predefined role Monitoring Metric Writer (roles/monitoring.metricWriter) for the VM's service account.
This role grants only the monitoring.metricWriter permission needed to publish metric time-series data to Cloud Monitoring, satisfying least privilege.

Anahtar Kavram

Compute Engine OS Telemetry Collection and IAM Least Privilege
Tahmini Süre:2m 0s
Bu soruyu puanla