
Answer-first summary for fast verification
Answer: resource.type=“gce_instance“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
The correct query targets the Apache logs by specifying the resource type as `gce_instance` and the appropriate log names (`/apache-access` or `/apache-error`). The other options either target the wrong resource type (`gae_app`) or the wrong logs (Admin activity and Data Access logs). For more details, refer to Logging agent application queries.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Imagine you're on an SRE team responsible for an Apache web service application deployed on Google Compute Engine, with FluentD installed for logging. Your task is to review the Apache logs. Which query would you use?
A
resource.type=“gae_app“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
B
resource.type=“gce_instance“ AND log_id(“cloudaudit.googleapis.com/data_access“).
C
resource.type=“gce_instance“ AND (logName:“/apache-access“ OR logName:“/apache-error“).
D
resource.type=“gce_instance“ AND log_id(“cloudaudit.googleapis.com/activity“).
No comments yet.