Constant network traffic in compute engine

33 Views Asked by At

I am seeing constant network usage in my compute engine VM instance. It's a VM created using Googles click to deploy of WordPress site. How to find out what is causing this constant network traffic.

enter image description here

I tried to SSH and use netstat, but could not find any process using network traffic

1

There are 1 best solutions below

0
Yvan G. On

I suggest use VPC Flow Logs once VPC flow log is enabled it can capture the source and destination of the network traffic. Its use cases are Network Monitoring, Understanding network usage and optimizing network traffic expenses and Network forensics wherein can help you diagnose this concern. More information about this feature can be seen on the shared link.

You can follow this guidance to enable flow logs.

I assume that you are already using a subnet since the VM instance is already created so from the link shared better follow the steps from “Enable VPC Flow Logs for an existing subnet”. Let me share a screenshot below of the steps just in case the link or documentation is not available.

image

To help you diagnose this concern, you can access the specific subnet by going to Logs Explorer and run this query below

resource.type="gce_subnetwork"
logName="projects/PROJECT_ID/logs/compute.googleapis.com%2Fvpc_flows"
resource.labels.subnetwork_name="SUBNET_NAME"

You can also diagnose this concern by accessing the specific VM and run the query below:

resource.type="gce_subnetwork"
logName="projects/PROJECT_ID/logs/compute.googleapis.com%2Fvpc_flows"
jsonPayload.src_instance.vm_name="VM_NAME"