Medium1 markMultiple Choice
Domain 5.3: Viewing audit logsDomain 5Audit LogsCloud LoggingFiltering

GCP ACE · Question 49 · Domain 5.3: Viewing audit logs

You are using the Logs Explorer in the Google Cloud Console. You want to write a query to filter the logs so that you ONLY see Admin Activity audit logs related to Compute Engine instances.

Which query filter should you use?

Answer options:

A.

logName="projects/[PROJECT_ID]/logs/cloudaudit.googleapis.com%2Factivity" AND resource.type="gce_instance"

B.

logName="syslog" AND resource.type="gce_instance"

C.

severity=ERROR AND resource.type="gce_instance"

D.

resource.type="audit_log" AND service="compute.googleapis.com"

How to approach this question

Identify the specific `logName` used for Admin Activity logs and the `resource.type` for Compute Engine.

Full Answer

A.`logName="projects/[PROJECT_ID]/logs/cloudaudit.googleapis.com%2Factivity" AND resource.type="gce_instance"`✓ Correct
logName="projects/[PROJECT_ID]/logs/cloudaudit.googleapis.com%2Factivity" AND resource.type="gce_instance"
In Cloud Logging, Admin Activity audit logs are stored under the log name `cloudaudit.googleapis.com/activity`. To narrow the search to only Compute Engine VMs, you add a filter for the resource type `gce_instance`. Combining these gives you exactly the administrative actions performed on VMs.

Common mistakes

Confusing OS logs (`syslog`) with GCP API audit logs.

Practice the full GCP Associate Cloud Engineer Practice Exam 5

50 questions · hints · full answers · grading

More questions from this exam