hardgcloud

Query Cloud Logging for error-level logs from Compute Engine instances

command

gcloud logging read "resource.type=gce_instance AND severity>=ERROR" --limit 20

also accepted

gcloud logging read "resource.type=gce_instance

Command breakdown

Part of the Google Cloud CLI (gcloud) — Operations category.

gcloudloggingread"resource.type=gce_instanceANDseverity>=ERROR"--limit20
FlagPurpose
--limitBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →