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
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?
AA threshold alerting policy: CPU utilization above 85% for 10 minutes, notifying an email channel
BAn uptime check on each VM's HTTP port, with an alerting policy that fires on failed checks
CA Cloud Monitoring dashboard with a CPU utilization chart and a threshold line drawn at 85%
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.
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.)
ACreate a sink on the organization with --include-children and a filter for audit logs, routing to the dataset
BCreate a sink in each existing project that routes audit logs to the dataset
CGrant the security team Logs Viewer on the organization and query logs in the Logs Explorer
DGrant the sink's writer identity permission to write to the BigQuery dataset
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.
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?
ATurn on VPC Flow Logs for every subnet from which users reach the bucket's objects
BEnable Admin Activity audit logs for Cloud Storage in the project's audit configuration
CEnable Data Access audit logs of type DATA_READ for the Cloud Storage service
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.
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?
AInstall the Ops Agent on the VMs, with a logging receiver for the application files
BEnable VPC Flow Logs on the subnet and build charts from the flow log fields
CTurn on Data Access audit logs for Compute Engine in the project's audit configuration
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.
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?
AError Reporting
BUptime checks
CCloud Profiler
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.
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?
ACloud Asset Inventory
BCloud Hub in the console
CThe Logs Explorer
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.
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?
AprotoPayload.authenticationInfo.principalEmail
Bresource.type
CprotoPayload.methodName
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.
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?
ATwo email channels, one read by the function
BAn SMS channel and an email channel
CA log sink from the alert's logs to BigQuery
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.