Remediation
From Google Cloud Console
- Go to the VPC network GCP Console visiting https://console.cloud.google.com/networking/networks/list
- Click the name of a subnet, The
Subnet detailspage displays. - Click the
EDITbutton. - Set
Flow LogstoOn. - Expand the
Configure Logssection. - Set
Aggregation Intervalto5 SEC. - Check the box beside
Include metadata. - Set
Sample rateto100. - Click
Save.
Note
It is not possible to configure a Log filter from the console.
From Google Cloud CLI
To enable VPC Flow Logs for a network subnet, run the following command:
gcloud compute networks subnets update {{subnet-name}} \
--region {{region}} \
--enable-flow-logs \
--logging-aggregation-interval=interval-5-sec \
--logging-flow-sampling=1 \
--logging-metadata=include-all