Google Professional Cloud DevOps Engineer Question 183
Select 2Google Cloud PlatformYour organization has multiple Google Cloud projects for different teams, each running its own services. You have been tasked with setting up centralized monitoring and logging to gain insights across all projects while maintaining access control. Which of the following steps should you take to achieve this?
- A
Configure a Shared VPC to link all projects and enable centralized monitoring.
- B
Set up a central logging and monitoring project with Cloud Monitoring and Cloud Logging enabled, and configure aggregated sinks for logs from all projects.
- C
Use Cloud Identity and Access Management (IAM) to grant specific roles, such as 'Logging Admin' and 'Monitoring Viewer,' in the central monitoring project to appropriate users.
- D
Configure each service to export logs and metrics directly to external systems like BigQuery or Pub/Sub for centralized analysis.
- E
Enable the Resource Hierarchy Viewer role in each project to automatically collect logs and monitoring data in the central project.
Show answer and explanation
Correct answers: B, C
Explanation
To set up multi-project monitoring and logging, you should create a dedicated project for centralized monitoring and logging. Use aggregated sinks to collect logs from multiple projects and configure IAM roles to manage access. This approach ensures efficient and secure management of logs and metrics across the organization. Other options, such as Shared VPC or exporting to external systems, do not directly address centralized monitoring and logging in Google Cloud.
- A. Incorrect.
Incorrect. A Shared VPC is designed for sharing networks across projects but is not relevant to centralized monitoring and logging.
- B. Correct.
Correct. Setting up a central monitoring project with aggregated sinks allows you to collect and analyze logs and metrics across projects effectively.
- C. Correct.
Correct. IAM roles like 'Logging Admin' and 'Monitoring Viewer' are necessary to control access to the centralized logs and monitoring data.
- D. Incorrect.
Incorrect. While exporting logs and metrics to external systems can be useful for specific use cases, it is not required for centralized monitoring and logging within Google Cloud.
- E. Incorrect.
Incorrect. The Resource Hierarchy Viewer role provides access to view the resource hierarchy but does not facilitate centralized logging and monitoring.