Google Professional Cloud DevOps Engineer exam dumps

Google Professional Cloud DevOps Engineer practice question 136 of 268

Professional Cloud DevOps Engineer. Associate level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud DevOps Engineer Question 136

Single answerGoogle Cloud Platform

Your team has implemented a new application running on Google Kubernetes Engine (GKE) and configured Cloud Logging to collect logs from the application. You want to monitor specific error patterns in the logs and create alerts based on them. How can you create a custom metric to achieve this?

  1. A

    Use Logs Explorer to create a metric by defining a filter that captures the specific error patterns.

  2. B

    Enable the 'Error Reporting' service, which will automatically create custom metrics for you.

  3. C

    Create a custom metric in Cloud Monitoring and manually input the error details.

  4. D

    Write a Cloud Function to parse the logs and send the error count to a user-defined metric.

Show answer and explanation

Correct answer: A

Explanation

To monitor specific error patterns in logs and create alerts, you should use Logs Explorer in Cloud Logging. It allows you to define log filters matching your criteria and create custom metrics directly from those filters. This approach is efficient and integrates seamlessly with Google Cloud Monitoring.

  • A. Correct.

    This is the correct answer. Logs Explorer allows you to define filters that match specific log entries and create metrics based on those filters. This is the recommended approach for creating custom metrics from logs.

  • B. Incorrect.

    This is incorrect. While Error Reporting can identify and aggregate errors from logs, it does not allow you to create custom metrics based on specific log patterns.

  • C. Incorrect.

    This is incorrect. Cloud Monitoring does not allow direct creation of custom metrics from logs. You need to use Logs Explorer or other tools to define and extract metrics from logs.

  • D. Incorrect.

    This is incorrect. Writing a Cloud Function is not necessary for creating custom metrics from logs. Logs Explorer provides a built-in feature for this purpose.

Timed practice exam

Take a Google Professional Cloud DevOps Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam