
Answer-first summary for fast verification
Answer: resource.type="gce_instance" AND (logName:"/apache-access" OR logName:"/apache-error").
Option D is correct because it specifies the resource type as Google Compute Engine (gce_instance) and targets the Apache access and error logs. Option A is incorrect as it uses the wrong resource type (App Engine). Options B and C are incorrect because they target Admin activity logs and Data Access logs, respectively, not Apache logs. 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 managing an Apache web service application deployed on Google Compute Engine with FluentD agent installed, you're tasked with reviewing the Apache logs. Which query would you use?
A
resource.type="gce_instance" AND log_id("cloudaudit.googleapis.com/activity").
B
resource.type="gce_instance" AND log_id("cloudaudit.googleapis.com/data_access").
C
resource.type="gae_app" AND (logName:"/apache-access" OR logName:"/apache-error").
D
resource.type="gce_instance" AND (logName:"/apache-access" OR logName:"/apache-error").
No comments yet.