Google Associate Cloud Engineer Question 307
Select 3Google Cloud PlatformAs a Google Cloud Certified Associate Cloud Engineer, you are tasked with identifying errors in your application running on Google Cloud. You need to view specific log message details for an error that occurred in a Compute Engine instance. Which steps should you follow in Cloud Logging to efficiently locate and view the detailed log message for the error?
- A
A. Navigate to Logs Explorer and use the resource type filter to select 'GCE VM Instance'.
- B
B. Use the 'timestamp' field in the query to narrow down the logs to the specific time period when the error occurred.
- C
C. Apply a severity level filter to show only logs with severity 'ERROR'.
- D
D. Download all logs and manually search for the error in a text editor.
- E
E. Enable Cloud Logging API for the project to access logs.
Show answer and explanation
Correct answers: A, B, C
Explanation
To efficiently locate and view specific log message details in Cloud Logging, you should use the Logs Explorer's filtering capabilities. Filtering by resource type, timestamp, and severity level allows you to quickly zero in on the relevant logs, reducing the time and effort needed to identify the error. Downloading all logs for manual searching is inefficient, and enabling the Cloud Logging API is unnecessary for viewing logs as it is already integrated into the platform.
- A. Correct.
A. This option helps you filter logs specifically for the Compute Engine instances, making it easier to locate relevant logs.
- B. Correct.
B. Using the timestamp filter allows you to narrow down log entries to the specific time frame when the error occurred, making it more efficient to find the logs you need.
- C. Correct.
C. Applying a severity filter to show only ERROR logs reduces the noise and helps you focus on the critical log entries that indicate problems.
- D. Incorrect.
D. This option is inefficient and could be very time-consuming, especially with large volumes of log data.
- E. Incorrect.
E. The Cloud Logging API is already enabled for accessing logs; enabling it is unnecessary for viewing logs.