Google Associate Cloud Engineer exam dumps

Google Associate Cloud Engineer practice question 300 of 375

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

Google Associate Cloud Engineer Question 300

Single answerGoogle Cloud Platform

You are a Google Cloud Engineer tasked with monitoring and troubleshooting an application running on Google Kubernetes Engine (GKE). You need to filter logs in Cloud Logging to investigate a specific error that occurred yesterday. Which of the following filter expressions would you use to view only the ERROR logs from your GKE cluster for that day?

  1. A

    resource.type="k8s_container" severity="ERROR" timestamp>="2023-10-11T00:00:00Z" timestamp<"2023-10-12T00:00:00Z"

  2. B

    resource.labels.cluster_name="my-cluster" severity="ERROR" timestamp="2023-10-11"

  3. C

    resource.type="gce_instance" severity="ERROR" timestamp>="2023-10-11T00:00:00Z" timestamp<"2023-10-12T00:00:00Z"

  4. D

    resource.type="k8s_container" severity="ERROR" timestamp>="2023-10-10T00:00:00Z" timestamp<"2023-10-11T00:00:00Z"

Show answer and explanation

Correct answer: A

Explanation

To filter logs in Cloud Logging for a specific time period and severity, you need to specify the correct resource type, severity level, and a timestamp range that covers the entire day you are interested in. The first option correctly uses 'k8s_container' as the resource type, 'ERROR' for the severity, and a timestamp range that includes all logs for the specified day.

  • A. Correct.

    This filter expression correctly specifies the resource type as 'k8s_container', the severity level as 'ERROR', and the timestamp range for the logs from yesterday.

  • B. Incorrect.

    This option incorrectly specifies the timestamp as a single date instead of a range, which will not correctly filter for all logs within that day.

  • C. Incorrect.

    This filter incorrectly uses 'gce_instance' as the resource type, which is not relevant for a GKE cluster.

  • D. Incorrect.

    This filter expression incorrectly specifies the timestamp range as the day before yesterday.

Timed practice exam

Take a Google Associate Cloud 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