nerdexam
Google

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #63

You are managing an application that runs in Compute Engine. The application uses a custom HTTP server to expose an API that is accessed by other applications through an internal TCP/UDP load…

The correct answer is D. Enable VPC Flow Logs on the subnet. To log each IP address accessing an API through a Compute Engine instance using the fewest steps, enable VPC Flow Logs on the relevant subnet.

Submitted by cyberguy42· Apr 18, 2026Implementing service monitoring strategies

Question

You are managing an application that runs in Compute Engine. The application uses a custom HTTP server to expose an API that is accessed by other applications through an internal TCP/UDP load balancer. A firewall rule allows access to the API port from 0.0.0.0/0. You need to configure Cloud Logging to log each IP address that accesses the API by using the fewest number of steps. What should you do first?

Options

  • AEnable Packet Mirroring on the VPC.
  • BInstall the Ops Agent on the Compute Engine instances.
  • CEnable logging on the firewall rule.
  • DEnable VPC Flow Logs on the subnet.

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    4% (1)
  • D
    92% (24)

Why each option

To log each IP address accessing an API through a Compute Engine instance using the fewest steps, enable VPC Flow Logs on the relevant subnet.

AEnable Packet Mirroring on the VPC.

Packet Mirroring is for deep packet inspection and network forensics, which is a more complex and resource-intensive solution than simply logging IP addresses for access.

BInstall the Ops Agent on the Compute Engine instances.

Installing the Ops Agent collects logs *from* the instance, but it's not the primary or most efficient way to capture network-level access IPs for a load-balanced service across all connections.

CEnable logging on the firewall rule.

Enabling logging on the firewall rule only logs when a rule is hit or denied, providing less comprehensive flow information compared to VPC Flow Logs, which capture details for all traffic.

DEnable VPC Flow Logs on the subnet.Correct

Enabling VPC Flow Logs on the subnet will capture metadata about all IP traffic flows, including source and destination IP addresses, that pass through the subnet's network interfaces. This directly fulfills the requirement to log each IP address accessing the API with minimal configuration changes.

Concept tested: Logging network traffic with VPC Flow Logs

Source: https://cloud.google.com/vpc/docs/flow-logs

Topics

#VPC Flow Logs#Cloud Logging#Network Monitoring#Compute Engine

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Practice