Google Professional Cloud Database Engineer Question 138
Select 3Google Cloud PlatformYou are managing a Cloud SQL instance running PostgreSQL for a production workload. Your team wants to ensure that they are notified immediately if there are any database errors, high CPU usage, or storage capacity reaching critical levels. How can you achieve this in Google Cloud?
- A
Create an alerting policy in Cloud Monitoring and set conditions for CPU usage, storage capacity, and errors.
- B
Enable the 'Error Reporting' feature in Google Cloud Console to automatically send alerts for database errors.
- C
Use Cloud Logging to create a log-based alert for specific error messages from the PostgreSQL instance.
- D
Set up an alerting policy in Cloud Monitoring using predefined metrics for 'Cloud SQL CPU utilization' and 'Cloud SQL storage capacity'.
- E
Install a third-party monitoring tool that integrates with Cloud SQL to set up alerts.
Show answer and explanation
Correct answers: A, C, D
Explanation
To set up alerts for errors and performance metrics in Cloud SQL, you should primarily use Google Cloud's native tools: Cloud Monitoring for alerting policies and Cloud Logging for log-based alerts. These tools allow you to monitor key metrics such as CPU usage, storage capacity, and errors effectively and without requiring additional third-party tools.
- A. Correct.
Correct. Cloud Monitoring allows you to create alerting policies with conditions based on Cloud SQL metrics, such as CPU usage, errors, and storage capacity.
- B. Incorrect.
Incorrect. While Error Reporting can help analyze errors, it is not designed to automatically send alerts specific to Cloud SQL database errors.
- C. Correct.
Correct. Cloud Logging can be used to filter for specific error messages and create log-based alerts, enhancing the monitoring of database errors.
- D. Correct.
Correct. Cloud Monitoring provides predefined metrics for Cloud SQL, such as CPU utilization and storage, which can be used directly in alerting policies.
- E. Incorrect.
Incorrect. While third-party tools can provide monitoring, Google Cloud's native tools (Cloud Monitoring and Logging) are sufficient and recommended for this use case.