An enterprise Site Reliability Engineering (SRE) team needs to route all data access and administrative audit log entries from multiple production Google Cloud projects into a centralized BigQuery dataset for long-term compliance analysis, while also establishing real-time operational alerts when critical application errors captured in the logs exceed an acceptable threshold. The solution must follow Google Cloud security and operational best practices. Which TWO configuration steps should the team perform to achieve this goal?
- Create an organization-level aggregated log sink targeted to the central BigQuery dataset destination, and grant the sink's writer identity the BigQuery Data Editor role on the destination dataset.Answer
- BAssign the primitive Owner role on the centralized BigQuery dataset to the aggregated log sink service account to prevent permission errors during dataset schema creation.
- Create a log-based metric in Cloud Logging to extract error occurrences, and configure a Cloud Monitoring alerting policy using the threshold of this metric.Answer
- DGrant the Service Account Admin role to team members so they can impersonate the log sink service account while building Cloud Monitoring alerting policies.
- EConfigure an exclusion filter on the organization log sink to drop all log entries with a severity of ERROR or higher to reduce ingestion costs.
Answer
The team should create an organization-level aggregated log sink directed to the central BigQuery dataset while granting the sink's writer identity the BigQuery Data Editor role, and create a log-based metric to trigger Cloud Monitoring alerting policies.
The correct architecture uses an organization-level aggregated sink with least-privilege IAM permissions (BigQuery Data Editor) to safely aggregate audit logs into BigQuery, combined with Cloud Logging log-based metrics and Cloud Monitoring alerting policies to trigger real-time operational alerts on critical application error rates.
Step-by-Step Solution
Key Concept
Centralized Log Aggregation and Log-based Metric Operational Alerting