I'm trying to use gcloud logging
along with regular expression. My query works in the console but I can't get it going via the CLI.
gcloud logging read "resource.type=gce_instance AND protoPayload.authenticationInfo.principalEmail=~'.*@example.com.au'" --limit=10 --format=json
I get the error:
ERROR: (gcloud.logging.read) INVALID_ARGUMENT: Unparseable filter: unrecognized node at token 'MEMBER'
I've tried with and without various quotes '' "" "\"\
I also have the same trouble when doing timestamp dates as well:
gcloud logging read "resource.type=gce_instance AND timestamp > '2021-06-15T00:00:00.000000Z'"
I get the error:
ERROR: (gcloud.logging.read) INVALID_ARGUMENT: Unparseable filter: syntax error at line 1, column 112, token ':';