Google Associate Cloud Engineer Question 320
Select 4Google Cloud PlatformYou are tasked with deploying the Ops Agent on multiple Compute Engine instances to collect both metrics and logs. Which of the following steps should you perform to ensure the Ops Agent is configured and deployed correctly?
- A
Use the Cloud Console to enable the Ops Agent on each instance.
- B
SSH into each instance and use the installation script provided by Google Cloud.
- C
Ensure that the necessary IAM permissions are granted for the Ops Agent to access logs and metrics.
- D
Create a startup script to automate the Ops Agent installation on future instances.
- E
Configure the Ops Agent to forward logs to Cloud Logging via a configuration file.
Show answer and explanation
Correct answers: B, C, D, E
Explanation
To deploy the Ops Agent on Compute Engine instances, you need to install it using Google's provided script either manually or through automation. Proper IAM permissions must be set, and configuration of the agent is necessary to ensure it correctly forwards logs and metrics. Automating installation via startup scripts is a common practice to maintain consistency and efficiency across multiple instances.
- A. Incorrect.
The Cloud Console does not provide a direct option to enable the Ops Agent on instances. It must be installed manually or through automation scripts.
- B. Correct.
SSH into each instance and using the installation script is a valid method to deploy the Ops Agent.
- C. Correct.
Ops Agent requires appropriate IAM permissions to access and manage logs and metrics.
- D. Correct.
Creating a startup script for automatic installation on future instances is a best practice to ensure consistency in deployments.
- E. Correct.
Configuring the Ops Agent to forward logs to Cloud Logging is required to collect and centralize logs in Google Cloud.