Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is running a third-party application on Compute Engine Linux virtual machines (VMs). You have installed the Google Cloud Ops Agent on the instances and now need to collect application-specific telemetry and ingest it into Cloud Monitoring.
Which configuration and permission setup should you implement to enable third-party metric ingestion?
This approach relies on the deprecated legacy Cloud Monitoring agent (collectd) and attempts to route metrics using Cloud Pub/Sub by assigning the Pub/Sub Publisher (roles/pubsub.publisher) role to the instance.
collectd agent is deprecated in favor of the unified Google Cloud Ops Agent, which supports modern telemetry standards like OpenTelemetry.roles/pubsub.publisher role allows publishing messages to Pub/Sub topics, not writing metrics to Cloud Monitoring APIs (monitoring.googleapis.com)./etc/stackdriver/collectd.conf is ignored by the Ops Agent.roles/monitoring.metricWriter IAM permission.You were designing an asynchronous event-driven data streaming pipeline where VM applications publish raw event payloads directly to a Pub/Sub topic for downstream processing.
The Google Cloud Ops Agent is the primary agent for collecting logs and metrics from Compute Engine virtual machines. It combines logging (Fluent Bit) and metrics (OpenTelemetry Collector) subsystems into a unified service managed through a single configuration file (/etc/google-cloud-ops-agent/config.yaml on Linux).
/etc/google-cloud-ops-agent/config.yaml.sudo systemctl restart google-cloud-ops-agent) loads the new configuration pipelines and starts metric scraping.roles/monitoring.metricWriter) IAM role, granting permission to write time-series data to monitoring.googleapis.com.
roles/monitoring.metricWriter avoids hardcoding static credentials or API keys on the host VM.This solution uses Google Cloud's current observability standard (Ops Agent) with native YAML pipeline declarations and standard IAM role assignment, ensuring automated, secure, and reliable metrics ingestion without unnecessary custom scripts.
This approach attempts to pass configuration values through Compute Engine VM custom metadata attributes and assigns read-only monitoring permissions (roles/monitoring.viewer) to the instance service account.
roles/monitoring.viewer) role only grants read permissions to view dashboards and query existing metrics. It lacks permissions such as monitoring.metricDescriptors.create and monitoring.timeSeries.create required to publish metric data.config.yaml file.roles/monitoring.viewer cannot write or create time series data.config.yaml has not been edited.You needed to grant an external reporting dashboard or read-only auditing account permission to view existing monitoring dashboards without allowing them to ingest new telemetry.
This option builds an indirect, batch-oriented ingestion pipeline that writes metrics to Cloud Storage buckets and processes them with Cloud Functions, while assigning storage management permissions.
roles/storage.objectAdmin) do not grant permissions to write time series into Cloud Monitoring.You were implementing a long-term data archival or batch data lake export solution for historical raw metrics rather than real-time application monitoring.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated