Soru

Zorluk: OrtaMonitoring and Logging

An infrastructure team hosts a critical enterprise order processing application on a fleet of Compute Engine Linux virtual machines. The team needs to collect both guest operating system memory utilization metrics and application logs from a custom log file path at `/var/log/orders/process.log`, forwarding all telemetry to Cloud Logging and Cloud Monitoring using Google's current recommended practices. Which two actions should the team perform to fulfill this requirement? (Select TWO.)

  1. Install the Google Cloud Ops Agent on each Compute Engine virtual machine instance.Cevap
  2. Configure the Ops Agent configuration file (`config.yaml`) to add a custom logging receiver for `/var/log/orders/process.log` and ensure the host metrics pipeline is enabled.Cevap
  3. C
    Install the legacy standalone Cloud Logging agent (`google-fluentd`) alongside the standalone Cloud Monitoring agent on each VM instance.
  4. D
    Enable the Cloud Logging and Monitoring APIs within the root Organization policy constraints instead of the local project.

Cevap

The correct actions are installing the unified Google Cloud Ops Agent on the VM instances and editing its `config.yaml` configuration file to include a logging receiver for the custom log path while enabling host metrics collection.
To collect custom log files and guest OS memory metrics from Compute Engine virtual machines, Google Cloud recommends deploying the unified Google Cloud Ops Agent. Once installed, customizing `/etc/google-cloud-ops-agent/config.yaml` allows administrators to configure custom file receivers for non-standard log paths like `/var/log/orders/process.log` and ensure memory metric collection is active.

Adım Adım Çözüm

1
Identify telemetry collection requirements
Memory metrics (guest OS) and custom application log files (`/var/log/orders/process.log`) are required from Compute Engine VMs.
Standard Compute Engine metrics do not capture internal guest OS memory without an agent installed.
2
Select the appropriate telemetry agent
Choose the Google Cloud Ops Agent as recommended by Google Cloud.
The Ops Agent combines logging and monitoring into a single daemon and supersedes legacy separate agents.
3
Configure the agent pipeline
Edit `/etc/google-cloud-ops-agent/config.yaml` to define a `files` logging receiver for `/var/log/orders/process.log` and verify the metrics pipeline.
The Ops Agent relies on YAML configuration files to specify non-default log locations and metrics pipelines.

Anahtar Kavram

Google Cloud Ops Agent Unified Telemetry Collection
Tahmini Süre:1m 30s
Bu soruyu puanla