> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor Cross-AZ Traffic

> Monitor cross-AZ traffic with AutoMQ's Kafka-compatible service for cloud-native data flow optimization. Gain insights into network performance efficiently.

After completing the configuration for cross-AZ traffic optimization, users can monitor their local network traffic and match it with the accessed brokers to identify the actual situation of cross-AZ data transfer.

## Monitoring Cross-AZ Traffic with Command-Line Tools

1. **Monitor network traffic**: On Linux, you can use `iftop` to view the incoming and outgoing traffic between the local machine and other IPs. The command is as follows:

   ```bash theme={null}
   iftop -t -s 60 -L 100 -n
   ```

2. **Identify node availability zones**: Query the cluster nodes of AutoMQ and the zones to which the nodes belong. The command is as follows:

   ```bash theme={null}
   ./bin/kafka-broker-api-versions.sh --bootstrap-server $bootstrap_server | grep id
   ```

   By matching the output of these two commands, you can observe whether cross-AZ traffic is being generated.

## Other Methods

If your application is deployed on AWS, you can also use the [Network Flow Monitor](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-NetworkFlowMonitor.html) feature of CloudWatch to monitor cross-Zone traffic.
