You run this Log Explorer query in Google Cloud Platform:
resource.type = "gce_instance" severity = "ERROR" "disk"
What will the query return?
Look at the resource type and severity filters carefully.
The query filters logs to only those from Compute Engine instances (resource.type = "gce_instance") with severity ERROR and containing the word 'disk'.
Which of these Log Explorer queries correctly filters logs from the last 24 hours?
Log Explorer supports relative time syntax like '-24h'.
Log Explorer supports relative time strings like '-24h' in queries. SQL-like functions are not valid, and fixed timestamps do not generally represent 'last 24 hours' without knowing the current time.
You want to find all HTTP request logs with status code 500 in Log Explorer. Which query is correct?
HTTP request logs use a specific field for status codes.
The field httpRequest.status contains the HTTP status code in GCP logs. Other fields are incorrect or do not exist for this purpose.
Which Log Explorer query best detects unauthorized access attempts to Cloud Storage buckets?
Look for the status code that means permission denied.
Status code 7 means 'PERMISSION_DENIED' in GCP logs, which indicates unauthorized access attempts.
You have a large volume of logs. Which query practice improves Log Explorer performance the most?
Filtering by structured fields first reduces data scanned.
Filtering by resource.type and severity first narrows logs quickly, improving query speed and reducing cost.