
Answer-first summary for fast verification
Answer: resource.type=“gce_instance“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
Option B is incorrect because it specifies a resource type for App Engine, not Compute Engine. Option C is correct as it accurately targets the Compute Engine resource type and the relevant Apache logs. Options A and D are incorrect as they focus on Admin activity and Data Access logs, respectively. For more details, refer to the [Google Cloud Logging documentation](https://cloud.google.com/logging/docs/view/query-library-preview#logging-agent-filters).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a member of an on-call SRE team overseeing an Apache web service application deployed on Google Compute Engine with FluentD agent installed, you're assigned to review the Apache logs. Which query would you use for this task?
A
resource.type=“gce_instance“ AND log_id(“cloudaudit.googleapis.com/activity“).
B
resource.type=“gae_app“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
C
resource.type=“gce_instance“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
D
resource.type=“gce_instance“ AND log_id(“cloudaudit.googleapis.com/data_access“).
No comments yet.