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)
- Install and configure the unified Google Cloud Ops Agent on the Compute Engine VM instances.Cevap
- BInstall the legacy Stackdriver Monitoring Agent and Stackdriver Logging Agent on all Compute Engine VM instances.
- 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
- DGrant 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
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.