jamiet
jamiet

Reputation: 12214

StackDriver filter works in UI, not with gcloud

I have the following filter in stackdriver at https://console.cloud.google.com/

resource.type="cloud_dataproc_cluster"
jsonPayload.application="application_1580294281653_0029"

and it returns lots of log records: enter image description here

however the same filter when using gcloud returns nothing:
gcloud logging read "resource.type=\"cloud_dataproc_cluster\" AND jsonPayload.application=\"application_1580294281653_0029\"" --format="csv(timestamp,severity,jsonPayload.message)"

I have no idea why. To me they look the same so they should return the same. I'm clearly missing something simple, anyone know what?

Upvotes: 0

Views: 79

Answers (1)

jamiet
jamiet

Reputation: 12214

ignore this, user error. I forgot to specify the project in my gcloud command. doh.

Upvotes: 1

Related Questions