Insights

Blog

GCP logs JSON Extract – Load into BigQuery

Use JSON Extract  – JSON_EXTRACT protopayload_auditlog.metadataJsontableDataRead SELECT REGEXP_EXTRACT(protopayload_auditlog.resourceName, ‘^projects/[^/]+/datasets/([^/]+)/tables’) AS datasetRef, COUNTIF(JSON_EXTRACT(protopayload_auditlog.metadataJson, “$.tableDataRead”) IS NOT NULL) AS dataReadEvents, FROM myproject.cloudaudit_googleapis_com_data_access_2019* WHERE JSON_EXTRACT(protopayload_auditlog.metadataJson, “$.tableDataRead”) IS NOT NULL GROUP BY…

Read more

Check when a GKE Cluster was created

Apply this filter to the logs (under operations from the cluster management screen). Default audit logs go back 180 days.   resource.type=”gke_cluster” protoPayload.authorizationInfo.permission=”container.clusters.create” resource.labels.cluster_name=”your-cluster-name” Default audit logs go…

Read more