Soru

Zorluk: OrtaMonitoring and Logging

An organization manages a fleet of Linux Compute Engine instances hosting an internal application. The operations team needs to collect both system memory utilization metrics and custom log files from these instances. Additionally, they must forward high-severity application error logs to a Pub/Sub topic located in a centralized auditing project. Which TWO actions should the cloud engineer take to implement this solution? (Select TWO)

  1. Install and configure the unified Google Cloud Ops Agent on the Compute Engine VM instances.Cevap
  2. B
    Install the legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent on all Compute Engine VM instances.
  3. Create a Log Router sink with a severity filter in Cloud Logging, set its destination to the central Pub/Sub topic, and grant the sink's service account the Pub/Sub Publisher role.Cevap
  4. D
    Grant the primitive Owner role on the centralized auditing project to the default Compute Engine service account to allow cross-project log routing.

Cevap

The cloud engineer must install the Google Cloud Ops Agent on the instances and create a Log Router sink with a severity filter that routes logs to the centralized Pub/Sub topic while granting the sink's writer identity the Pub/Sub Publisher role.
To collect guest OS metrics like memory and custom logs from Compute Engine, the Google Cloud Ops Agent must be installed on the VM instances. To route high-severity logs to an external Pub/Sub topic, a Cloud Logging Log Router sink with an appropriate filter must be created, and the sink's unique service account must be granted the Pub/Sub Publisher role on the destination topic.

Adım Adım Çözüm

1
Deploy Telemetry Collection Agent
System memory metrics and custom log files are collected from Compute Engine instances
Compute Engine default metrics do not include guest OS memory usage or custom log files without installing the unified Google Cloud Ops Agent.
2
Configure Centralized Log Export
High-severity logs are routed to the central Pub/Sub topic with necessary permissions
Log Router sinks evaluate log entries against inclusion filters and route them to destinations like Pub/Sub topics across projects, requiring the sink's unique writer identity to hold the Pub/Sub Publisher role.

Anahtar Kavram

Monitoring Compute Engine guest telemetry using Google Cloud Ops Agent and configuring Log Router sinks with least-privilege IAM roles for Pub/Sub export.
Bu soruyu puanla