Google Associate Cloud Engineer Question 323
Select 4Google Cloud PlatformYou are tasked with configuring the Ops Agent on several Compute Engine instances to collect both logs and metrics. Which steps should you follow to ensure the Ops Agent is properly configured and deployed across your instances?
- A
Install the Ops Agent on each instance using a Google Cloud provided script.
- B
Configure the Ops Agent to collect only logs by default.
- C
Edit the Ops Agent configuration file to include both logging and monitoring directives.
- D
Restart the Ops Agent service to apply new configuration changes.
- E
Ensure that the instances have the appropriate IAM roles to write metrics and logs to Google Cloud Monitoring and Logging.
Show answer and explanation
Correct answers: A, C, D, E
Explanation
To configure and deploy the Ops Agent effectively, you need to install it on your instances, configure it to collect the necessary logs and metrics, and ensure it has the appropriate permissions to send this data to Google Cloud services. Restarting the agent is crucial after configuration changes to ensure the new settings take effect.
- A. Correct.
Installing the Ops Agent on each instance is necessary to enable it to collect logs and metrics.
- B. Incorrect.
By default, the Ops Agent can be configured to collect both logs and metrics; there's no need to restrict it to logs only unless specified.
- C. Correct.
Editing the configuration file is essential to specify what logs and metrics need to be collected.
- D. Correct.
Restarting the Ops Agent is necessary to apply any changes made to the configuration.
- E. Correct.
IAM roles must be assigned to allow the Ops Agent to send data to Google Cloud Monitoring and Logging services.