Skip to content

Associate Cloud Engineer · Domain 3: Ensuring the successful operation of a cloud solution · 30% of the exam

Task 3.4: Monitoring and logging.

Alerting policies and user-defined (custom) metrics, audit, flow and firewall logs, log sinks, buckets and Observability Analytics, finding and reading log entries, diagnostic tools, Personalized Service Health, Ops Agent, Managed Service for Prometheus, Gemini Cloud Assist, Active Assist and Cloud Hub.

Study it

  • Alerting policies, user-defined metrics and Ops Agent

    Partly covered by: CloudWatch, Alarms & X-Ray, Observability Basics

  • Audit logs, flow logs, log sinks, log buckets and Observability Analytics

    Partly covered by: Observability Basics

  • Diagnosing an application: Cloud Trace, Cloud Profiler, Query Insights

    Partly covered by: Tracing a Request

  • Personalized Service Health, Managed Service for Prometheus, Gemini Cloud Assist, Active Assist and Cloud Hub

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

The on-call team wants an email whenever any VM in a project stays above 85% CPU utilization for 10 minutes, but not for brief spikes. What should you create?

  1. AA threshold alerting policy: CPU utilization above 85% for 10 minutes, notifying an email channel
  2. BAn uptime check on each VM's HTTP port, with an alerting policy that fires on failed checks
  3. CA Cloud Monitoring dashboard with a CPU utilization chart and a threshold line drawn at 85%
  4. DA log-based metric that counts CPU log entries from the VMs, with an alert when it exceeds 85
Show the answer and why
  • AA threshold alerting policy: CPU utilization above 85% for 10 minutes, notifying an email channel

    Correct

    A threshold condition with a retest window fires only when the value stays above the threshold for that long, and the channel delivers the email.

  • BAn uptime check on each VM's HTTP port, with an alerting policy that fires on failed checks

    Incorrect

    The requirement is sustained CPU load, which this does not measure.

  • CA Cloud Monitoring dashboard with a CPU utilization chart and a threshold line drawn at 85%

    Incorrect

    A dashboard shows the data but sends no notification when the line is crossed.

  • DA log-based metric that counts CPU log entries from the VMs, with an alert when it exceeds 85

    Incorrect

    CPU utilization is already a metric; VMs do not write a log entry per CPU measurement to count.

An alerting policy pairs a condition with notification channels. The duration setting is what separates a sustained problem from a spike.

Question 2 · choose 2

Security wants the audit logs of every project in the organization, including projects created later, copied to one BigQuery dataset in a security project for SQL analysis. Which TWO steps should you take? (Choose TWO.)

  1. ACreate a sink on the organization with --include-children and a filter for audit logs, routing to the dataset
  2. BCreate a sink in each existing project that routes audit logs to the dataset
  3. CGrant the security team Logs Viewer on the organization and query logs in the Logs Explorer
  4. DGrant the sink's writer identity permission to write to the BigQuery dataset
  5. EIncrease the retention of each project's _Default log bucket to 10 years
Show the answer and why
  • ACreate a sink on the organization with --include-children and a filter for audit logs, routing to the dataset

    Correct

    An aggregated sink at the organization routes matching logs from every child project, including new ones.

  • BCreate a sink in each existing project that routes audit logs to the dataset

    Incorrect

    Project sinks cover only today's projects; every new project would need its own sink.

  • CGrant the security team Logs Viewer on the organization and query logs in the Logs Explorer

    Incorrect

    Viewing logs in place does not copy them to BigQuery for SQL analysis.

  • DGrant the sink's writer identity permission to write to the BigQuery dataset

    Correct

    The sink writes with its own service identity, which needs write access to the destination before logs arrive.

  • EIncrease the retention of each project's _Default log bucket to 10 years

    Incorrect

    This changes nothing about where the logs end up; they would still be spread across projects.

Aggregated sinks gather logs from a whole organization or folder. Like any sink, they write as a service identity that must be granted access to the destination.

Question 3 · choose 1

An auditor asks who downloaded objects from a sensitive Cloud Storage bucket last week. In Cloud Logging you find Admin Activity entries for bucket changes, but no entries for object reads. What should you do so that future reads are recorded?

  1. ATurn on VPC Flow Logs for every subnet from which users reach the bucket's objects
  2. BEnable Admin Activity audit logs for Cloud Storage in the project's audit configuration
  3. CEnable Data Access audit logs of type DATA_READ for the Cloud Storage service
  4. DCreate a log-based metric that counts storage.objects.get entries in the _Default bucket
Show the answer and why
  • ATurn on VPC Flow Logs for every subnet from which users reach the bucket's objects

    Incorrect

    These do not record which identity read which object.

  • BEnable Admin Activity audit logs for Cloud Storage in the project's audit configuration

    Incorrect

    Admin Activity logs are always written and cannot be turned off; they record configuration changes, not object reads.

  • CEnable Data Access audit logs of type DATA_READ for the Cloud Storage service

    Correct

    Data Access audit logs, which record reads of data, are disabled by default for Cloud Storage and must be enabled.

  • DCreate a log-based metric that counts storage.objects.get entries in the _Default bucket

    Incorrect

    Without Data Access logs there are no read entries in Cloud Logging to work with.

Admin Activity logs are always on. Data Access logs can be high volume, so most services leave them off until you enable the log types you need.

Question 4 · choose 1

In Cloud Monitoring you can see CPU, disk I/O and network charts for your Compute Engine VMs, but not memory utilization or disk space used inside the guest. You also want the VMs' application log files in Cloud Logging. What should you do?

  1. AInstall the Ops Agent on the VMs, with a logging receiver for the application files
  2. BEnable VPC Flow Logs on the subnet and build charts from the flow log fields
  3. CTurn on Data Access audit logs for Compute Engine in the project's audit configuration
  4. DCreate log-based metrics for memory use from the text in each VM's serial port output
Show the answer and why
  • AInstall the Ops Agent on the VMs, with a logging receiver for the application files

    Correct

    The Ops Agent collects guest metrics such as memory and disk usage, and its logging receivers send log files to Cloud Logging.

  • BEnable VPC Flow Logs on the subnet and build charts from the flow log fields

    Incorrect

    These carry no memory or disk usage from inside the guest.

  • CTurn on Data Access audit logs for Compute Engine in the project's audit configuration

    Incorrect

    Audit logs record API calls made to Compute Engine, not what happens inside the guest operating system.

  • DCreate log-based metrics for memory use from the text in each VM's serial port output

    Incorrect

    Serial port output is not a reliable source of memory metrics, and it does not ship the application log files.

Metrics from the hypervisor cannot see inside the guest. The Ops Agent runs in the VM and sends both guest metrics and logs.

Question 5 · choose 1

A request to a checkout API passes through four microservices on Cloud Run before it returns. Users report that checkout became slow last week, and you need to find which service in the chain adds the delay. Which tool should you use?

  1. AError Reporting
  2. BUptime checks
  3. CCloud Profiler
  4. DCloud Trace
Show the answer and why
  • AError Reporting

    Incorrect

    Error Reporting groups errors and exceptions; slow requests that succeed do not appear there.

  • BUptime checks

    Incorrect

    It gives no breakdown of where the time goes across the four services.

  • CCloud Profiler

    Incorrect

    It does not show how a single request moves through the four services.

  • DCloud Trace

    Correct

    Cloud Trace records the latency of each step of a request across services, so you can see where the time is spent.

Distributed tracing breaks one request into spans per service, which shows where the latency of a request across several services is added.

Question 6 · choose 1

An operations lead wants one place in the console that brings together active Google Cloud incidents and maintenance events, Monitoring alerts, quota usage and application health for an App Hub application. What should the lead use?

  1. ACloud Asset Inventory
  2. BCloud Hub in the console
  3. CThe Logs Explorer
  4. DThe Billing Reports page
Show the answer and why
  • ACloud Asset Inventory

    Incorrect

    Asset Inventory tracks resources, not events and health.

  • BCloud Hub in the console

    Correct

    Cloud Hub centralizes active events, health data, capacity and other operational insights for projects and App Hub applications.

  • CThe Logs Explorer

    Incorrect

    The Logs Explorer shows log entries, not a combined operations view.

  • DThe Billing Reports page

    Incorrect

    Billing reports show costs, not health or incidents.

Cloud Hub is the operations front page that correlates events, alerts and capacity across a project or application.

Question 7 · choose 1

In the Logs Explorer you want only log entries from Compute Engine VMs with severity ERROR or higher. Which query should you use?

  1. Aresource.type="gce_instance" AND severity>=ERROR
  2. Bgce_instance ERROR
  3. CSELECT * FROM logs WHERE type = 'vm' AND level = 'error'
  4. Dresource.type="k8s_cluster" AND severity=ERROR
Show the answer and why
  • Aresource.type="gce_instance" AND severity>=ERROR

    Correct

    The query restricts the resource type to VMs and the severity to ERROR and above.

  • Bgce_instance ERROR

    Incorrect

    Bare words search text anywhere in entries instead of filtering fields.

  • CSELECT * FROM logs WHERE type = 'vm' AND level = 'error'

    Incorrect

    The Logs Explorer uses the Logging query language, not this SQL.

  • Dresource.type="k8s_cluster" AND severity=ERROR

    Incorrect

    This selects GKE cluster logs and only exact ERROR entries.

Filter on indexed fields such as resource.type and severity to find relevant entries quickly.

Question 8 · choose 1

An Admin Activity audit log entry shows that a firewall rule was deleted. Which field of the entry tells you which user or service account made the call?

  1. AprotoPayload.authenticationInfo.principalEmail
  2. Bresource.type
  3. CprotoPayload.methodName
  4. Dresource.labels.project_id
Show the answer and why
  • AprotoPayload.authenticationInfo.principalEmail

    Correct

    The authenticationInfo of an audit log entry identifies the principal that made the request.

  • Bresource.type

    Incorrect

    The resource type says what kind of resource the entry is about, not who made the call.

  • CprotoPayload.methodName

    Incorrect

    The method name shows which operation was called, not who called it.

  • Dresource.labels.project_id

    Incorrect

    This identifies the project of the resource, not the caller.

Audit log entries carry the caller's identity in authenticationInfo, which answers the question of who did what.

Question 9 · choose 1

When a specific alerting policy fires, an automated function must run to restart a stuck worker, and the on-call team should also get an email. Which notification channels should the policy use?

  1. ATwo email channels, one read by the function
  2. BAn SMS channel and an email channel
  3. CA log sink from the alert's logs to BigQuery
  4. DPub/Sub for the automation, plus an email channel
Show the answer and why
  • ATwo email channels, one read by the function

    Incorrect

    Parsing email is a fragile way to trigger automation.

  • BAn SMS channel and an email channel

    Incorrect

    Neither channel triggers code.

  • CA log sink from the alert's logs to BigQuery

    Incorrect

    Sinks route logs; they are not alert notification channels.

  • DPub/Sub for the automation, plus an email channel

    Correct

    Pub/Sub channels let code act on notifications, while email informs people.

Choose channels by who acts: people get email or chat, programs get Pub/Sub or webhooks.

Question 10 · choose 1

You want to look at the CPU utilization of three VMs over the last six hours right now, without creating a dashboard. What should you use?

  1. AAn alerting policy on CPU utilization
  2. BA new custom dashboard with one chart
  3. CMetrics Explorer in Cloud Monitoring
  4. DThe Logs Explorer filtered to the VMs
Show the answer and why
  • AAn alerting policy on CPU utilization

    Incorrect

    Alerts notify on conditions; they are not for ad-hoc charts.

  • BA new custom dashboard with one chart

    Incorrect

    This works but is the dashboard you wanted to avoid.

  • CMetrics Explorer in Cloud Monitoring

    Correct

    Metrics Explorer builds temporary charts to visualize metrics without a dashboard.

  • DThe Logs Explorer filtered to the VMs

    Incorrect

    Logs show entries, not CPU utilization time series.

Use Metrics Explorer for quick questions and dashboards for views you keep.

Practise domain 3 →Practise all domains →