GCP Associate Cloud Engineer Practice Question

Your team manages several Ubuntu 20.04 Compute Engine VMs that run a custom web application. You must start collecting both system metrics and the application's log files located in /var/log/webapp/*.log and send them to Cloud Monitoring and Cloud Logging. Company policy permits only a single observability agent on any VM, and you want to minimize manual effort during rollout. Which approach meets the requirements?

  • Enable only the Cloud Monitoring API and use guest attributes plus a log sink to ingest the application's log files without any agent.

  • Run the Google-provided installation script to deploy the Ops Agent, then add a logs.files entry for /var/log/webapp/*.log in /etc/google-cloud-ops-agent/config.yaml and restart the agent.

  • Install the legacy Stackdriver Monitoring and Logging agents separately and configure fluentd to monitor the application logs.

  • Use OS Login to launch the Ops Agent in a Docker container and rely on its automatic log discovery, requiring no configuration changes.

GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot