Google Cloud Associate Cloud Engineer — Question 211
You have deployed an application on a single Compute Engine instance. The application writes logs to disk. Users start reporting errors with the application. You want to diagnose the problem. What should you do?
Answer options
- A. Navigate to Cloud Logging and view the application logs.
- B. Configure a health check on the instance and set a “consecutive successes” Healthy threshold value of 1.
- C. Connect to the instance’s serial console and read the application logs.
- D. Install and configure the Ops agent and view the logs from Cloud Logging.
Correct answer: D
Explanation
The correct answer is D because installing the Ops agent allows for comprehensive log management and integration with Cloud Logging, providing better insights into the application's behavior. Options A and C may not capture all relevant logs, while B focuses on health checks rather than log diagnostics.