Google Professional Cloud DevOps Engineer Question 8
Select 3Google Cloud PlatformYou are a DevOps Engineer managing multiple Google Cloud projects for your organization. To streamline your operations, you want to centralize monitoring and logging across these projects. Which of the following steps should you take to achieve this while ensuring best practices for scalability and security?
- A
Set up a centralized Logging Bucket in one project and configure log sinks in other projects to route logs to this bucket.
- B
Create a single Monitoring Workspace in one project and add the other projects as monitored projects.
- C
Enable the 'Logs Router API' in all the projects to facilitate centralized log management.
- D
Grant the necessary IAM roles, such as 'Logs Viewer' and 'Monitoring Viewer,' to relevant team members with least privilege in the centralized project.
- E
Store all logs locally in each project to ensure faster retrieval and avoid cross-project dependencies.
Show answer and explanation
Correct answers: A, B, D
Explanation
To centralize multi-project monitoring and logging, you should set up a centralized Logging Bucket and configure log sinks to route logs from other projects to this bucket. For monitoring, use a single Monitoring Workspace and add other projects as monitored projects. Ensure that you apply least privilege IAM roles for secure access to the centralized resources. These approaches promote scalability, security, and operational efficiency.
- A. Correct.
Correct. Setting up a centralized Logging Bucket and using log sinks to route logs across projects is a best practice for multi-project logging in Google Cloud.
- B. Correct.
Correct. Using a single Monitoring Workspace and adding other projects as monitored projects allows you to centralize monitoring and manage resources efficiently.
- C. Incorrect.
Incorrect. There is no specific 'Logs Router API' to enable; log routing is configured using log sinks and does not require enabling a separate API.
- D. Correct.
Correct. Granting least privilege IAM roles to team members ensures secure access to the centralized logging and monitoring resources.
- E. Incorrect.
Incorrect. Storing logs locally in each project does not support centralized logging and may lead to inefficiencies in retrieving and managing logs across multiple projects.