Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Your DevOps team is investigating intermittent connectivity timeouts and potential egress policy violations between Compute Engine workloads in a production VPC network. You need to enable VPC Flow Logs across the entire network to analyze traffic patterns while strictly controlling Cloud Logging ingestion costs.
Your solution must meet the following requirements:
0.5) to balance visibility with log volume.src_instance,dst_instance).Which command should you execute to implement this configuration?
The Network Management API provides centralized management for VPC Flow Logs configurations across entire VPC networks, organizations, or individual subnets. Creating a configuration using the gcloud network-management vpc-flow-logs-configs create command allows administrators to define network-wide telemetry policies with granular control over sampling rates, aggregation intervals, and metadata annotations.
--network=projects/my-prod-proj/global/networks/prod-vpc applies flow logging automatically across all present and future subnets in the VPC.--aggregation-interval=interval-30-sec batches and aggregates packet metrics over 30-second windows, providing granular visibility while decreasing logging churn.--flow-sampling=0.5 applies a secondary sampling rate of 50%, halving the volume of generated log entries to control ingestion costs.--metadata=custom-metadata along with --metadata-fields=src_instance,dst_instance restricts log record payload attributes strictly to the VM instance names, omitting unneeded fields.VpcFlowLogsService generate Admin Activity audit logs (CreateVpcFlowLogsConfig, UpdateVpcFlowLogsConfig), which are permanently enabled across Google Cloud by default at no extra cost.cloudaudit.googleapis.com/activity logs without requiring custom Data Access logging policies.Using the Network Management API with custom metadata flags precisely satisfies all observability and cost-optimization constraints while relying on default platform Admin Activity audit logging.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.