PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #49
Your company has a Google Cloud resource hierarchy with folders for production, test, and development. Your cyber security team needs to review your company's Google Cloud security posture to…
The correct answer is C. Create an aggregated log sink associated with the production folder that uses a Pub/Sub topic as. To centralize logs from all projects into your production folder for near-real-time analysis and alerting, you should create an aggregated log sink associated with the production folder that uses a Pub/Sub topic as its destination.
Question
Options
- AEnable the Workflows API and route all the logs to Cloud Logging.
- BCreate a central Cloud Monitoring workspace and attach all related projects.
- CCreate an aggregated log sink associated with the production folder that uses a Pub/Sub topic as
- DCreate an aggregated log sink associated with the production folder that uses a Cloud Logging
How the community answered
(24 responses)- A8% (2)
- B4% (1)
- C83% (20)
- D4% (1)
Why each option
To centralize logs from all projects into your production folder for near-real-time analysis and alerting, you should create an aggregated log sink associated with the production folder that uses a Pub/Sub topic as its destination.
Enabling the Workflows API is for orchestrating tasks and does not directly handle log centralization; logs are already routed to Cloud Logging by default.
Cloud Monitoring workspaces are used for metrics and dashboards across projects, not for centralizing raw log data for export and detailed analysis.
An aggregated log sink created at the production folder level can collect logs from all projects within that folder, automatically including future projects, and export them to a specified destination. Using a Pub/Sub topic as the destination for the log sink allows for real-time streaming of log entries, which is ideal for immediate processing, alerting, and near-real-time analysis by security tools or Cloud Functions.
While an aggregated log sink associated with the production folder is appropriate, using a Cloud Logging bucket as the destination is primarily for long-term storage and archival, which is less optimal for 'near-real time analysis' and 'alerting' compared to a Pub/Sub topic.
Concept tested: Cloud Logging aggregated sinks and Pub/Sub for real-time log export
Source: https://cloud.google.com/logging/docs/export/aggregated_sinks
Topics
Community Discussion
No community discussion yet for this question.