Google Cloud DevOps Certification Practice Test

Question: 1 / 400

What is the appropriate action to ensure that all existing and future Compute Engine instances collect system logs?

Manually install the Ops Agent on each VM listed in Cloud Asset Inventory.

Select VMs with Agent status of Not detected and install agents directly.

Create an Agent Policy using the gcloud CLI.

Creating an Agent Policy using the gcloud CLI is the most effective way to ensure that all existing and future Compute Engine instances collect system logs. This method allows you to define a policy that automatically manages the installation of the Ops Agent across multiple instances, including those that are created in the future. It centralizes the management of agent installation, eliminating the need for manual installation or scripting for each instance.

Utilizing the gcloud CLI for this purpose also ensures consistency across your environment, as the agent is applied uniformly based on the policy you establish. This approach minimizes the risk of human error and oversight that can occur with manual processes, and it enables scalability, especially in dynamic environments where instances may be frequently created or destroyed.

In contrast, manually installing the Ops Agent on each VM or directly installing agents on VMs with specific statuses can become cumbersome and fail to ensure new instances are properly configured. Installing the Ops Agent through a startup script on the Compute Engine image may work for instances created from that specific image, but it does not provide a comprehensive solution for existing instances that were created prior to the script being added. The Agent Policy method leverages automation and centrally enforces standards, making it the optimal choice.

Get further explanation with Examzify DeepDiveBeta

Install the Ops Agent on the Compute Engine image using a startup script.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy