Google Professional Cloud Database Engineer Question 135
Select 4Google Cloud PlatformYour organization uses Cloud SQL for hosting a production MySQL database. You need to set up proactive monitoring and alerting to ensure database performance and error handling. Which steps should you take to achieve this?
- A
Enable Cloud Monitoring and create an alerting policy for high CPU utilization.
- B
Configure a notification channel in Google Cloud Monitoring for email or SMS alerts.
- C
Set up an alerting policy to monitor the number of failed MySQL queries using the 'sql/queries_failed' metric.
- D
Create a custom log-based metric to track and alert on specific error codes in database logs.
- E
Enable automatic backups in Cloud SQL to ensure data recovery in case of errors.
Show answer and explanation
Correct answers: A, B, C, D
Explanation
To ensure proactive monitoring and alerting for a Cloud SQL database, you need to set up alerting policies for key performance metrics like CPU utilization, monitor failed queries, and create custom log-based metrics for specific errors. Additionally, configuring notification channels ensures you receive timely alerts. Automatic backups, while important, do not directly address alerting for errors or performance issues.
- A. Correct.
Correct. High CPU utilization is a critical performance metric for a Cloud SQL database. Setting an alerting policy for this ensures you are notified if the database faces resource contention issues.
- B. Correct.
Correct. Notification channels are essential for receiving real-time alerts, allowing you to respond quickly to database performance or error issues.
- C. Correct.
Correct. Monitoring failed queries using the 'sql/queries_failed' metric helps identify and address errors that could impact application performance.
- D. Correct.
Correct. Custom log-based metrics allow you to define specific conditions, such as error codes, and set up alerts for these scenarios.
- E. Incorrect.
Incorrect. While enabling automatic backups is a best practice for data recovery, it does not directly relate to setting up alerts for errors or performance metrics.