Google Professional Cloud Database Engineer Question 134
Select 3Google Cloud PlatformYou are managing a Cloud SQL instance for a production workload, and you need to monitor it for database errors and potential performance issues. You want to ensure you are alerted when CPU utilization exceeds 80%, disk space is running low, or there are frequent connection errors. What steps should you take to set up the appropriate alerts in Google Cloud?
- A
Use Cloud Monitoring to create an alert policy for CPU utilization with a threshold of 80%.
- B
Enable the default Cloud SQL monitoring alerts in the Cloud Console.
- C
Create a custom log-based alert in Cloud Monitoring to track high connection errors from Cloud SQL logs.
- D
Set up a Pub/Sub topic to receive and forward database metrics to your email.
- E
Create an alert policy for disk utilization and set a threshold to trigger when free space drops below 15%.
Show answer and explanation
Correct answers: A, C, E
Explanation
To monitor and receive alerts for CPU utilization, disk space, and connection errors in a Cloud SQL instance, you should use Cloud Monitoring's alert policies and log-based alerts. Setting a CPU utilization threshold (e.g., 80%) and monitoring disk utilization (e.g., free space below 15%) ensures performance and capacity are not exceeded. Additionally, log-based alerts can capture specific error patterns, such as frequent connection errors, to proactively address issues.
- A. Correct.
This is correct. Cloud Monitoring allows you to create alert policies, and setting a threshold for CPU utilization is a standard practice to monitor performance.
- B. Incorrect.
This is incorrect. While Cloud SQL integrates with Cloud Monitoring, there are no default alerts for specific metrics like CPU or disk space. Custom alert policies must be created.
- C. Correct.
This is correct. Custom log-based alerts can be configured in Cloud Monitoring to track specific error patterns, such as frequent connection errors, by parsing Cloud SQL logs.
- D. Incorrect.
This is incorrect. Pub/Sub is not directly used for setting up performance or error alerts. It is typically used for event-driven architectures and message forwarding.
- E. Correct.
This is correct. Monitoring disk utilization and creating an alert for low free space is a critical step to avoid database outages due to insufficient storage.