Soru

Zorluk: OrtaManaging Networking Resources

An operations team needs to enable network traffic telemetry on an existing VPC subnet named `prod-analytics-subnet` in the `us-east1` region. They must activate VPC Flow Logs, set the log aggregation interval to 10 seconds, and adjust the sampling rate to 50%50\% (0.50.5). Which two `gcloud` flags or command invocations must the administrator execute to complete this network management task? (Select TWO answers.)

  1. Execute `gcloud compute networks subnets update prod-analytics-subnet --region=us-east1 --enable-flow-logs`Cevap
  2. Execute `gcloud compute networks subnets update prod-analytics-subnet --region=us-east1 --logging-aggregation-interval=interval-10-sec --logging-flow-sampling=0.5`Cevap
  3. C
    Execute `gcloud compute networks subnets update prod-analytics-subnet --region=us-east1 --enable-vpc-audit-logs`
  4. D
    Install the Cloud Logging legacy agent on all Compute Engine instances in the subnet to capture subnet-level packet headers

Cevap

To manage and enable VPC Flow Logs on an existing subnet with specific aggregation and sampling parameters, run `gcloud compute networks subnets update prod-analytics-subnet --region=us-east1 --enable-flow-logs` to turn on logging, and `gcloud compute networks subnets update prod-analytics-subnet --region=us-east1 --logging-aggregation-interval=interval-10-sec --logging-flow-sampling=0.5` to configure the sampling rate and aggregation interval.
VPC Flow Logs are enabled and configured on a subnet level using the `gcloud compute networks subnets update` command. Passing `--enable-flow-logs` activates the feature on the subnet, while `--logging-aggregation-interval=interval-10-sec` and `--logging-flow-sampling=0.5` set the aggregation window and 50% sample rate respectively.

Adım Adım Çözüm

1
Identify the gcloud compute command group for managing subnet properties.
The correct command group is `gcloud compute networks subnets update` specifying the target subnet name and region.
Subnet settings such as flow log status, sampling rate, and aggregation intervals are managed at the VPC subnet resource layer.
2
Enable VPC Flow Logs on the target subnet.
Include the `--enable-flow-logs` flag in the subnet update invocation.
VPC Flow Logs must be explicitly enabled on the subnet.
3
Configure flow log sampling and aggregation settings.
Use `--logging-aggregation-interval=interval-10-sec` and `--logging-flow-sampling=0.5`.
These flags control the frequency of log aggregation and the fraction of network packets sampled for logging.

Anahtar Kavram

VPC Flow Logs Configuration via gcloud CLI
Bu soruyu puanla