Google Cloud Professional Cloud DevOps Engineer — Question 83

Your organization wants to collect system logs that will be used to generate dashboards in Cloud Operations for their Google Cloud project. You need to configure all current and future Compute Engine instances to collect the system logs, and you must ensure that the Ops Agent remains up to date. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C because creating an Agent Policy with the gcloud CLI allows you to manage the installation and updates of the Ops Agent across multiple VMs, ensuring they all remain compliant. Option A is incorrect as installing the agent on each VM individually is not efficient. Option B only addresses VMs with a specific status and does not ensure future instances are covered. Option D involves a startup script, which does not provide the same level of management and automation as an Agent Policy.