All Products
Search
Document Center

Smart Access Gateway:Flow log overview

Last Updated:Apr 01, 2026

Flow logs capture inbound and outbound network traffic of Smart Access Gateway (SAG) instances. Use flow log data to monitor traffic patterns, troubleshoot network errors, and make informed capacity and cost decisions.

Use cases

Traffic monitoring

  • Identify unexpected or unauthorized traffic flows across SAG instances.

  • Track bandwidth consumption for connected branches and sites.

  • Audit inbound and outbound traffic to meet compliance requirements.

Troubleshooting

  • Pinpoint the source of network errors using 5-tuple data (source IP, destination IP, source port, destination port, and protocol).

  • Correlate traffic anomalies with specific time windows using the start and end fields.

Capacity and cost planning

  • Analyze packet and byte counts to forecast bandwidth needs.

  • Identify top-traffic flows and optimize routing to reduce costs.

Flow log types

Flow logs are classified by storage location:

TypeStorage targetQuerying log dataPricing
Log Service flow logsAlibaba Cloud Log ServiceQuery and analyze in Log ServiceFree during public preview; Log Service charges separately for log storage and retrieval
NetFlow flow logsNetFlow collectors (external)Query on your NetFlow collectors

How Log Service flow logs work: Each log entry covers a specific 5-tuple over a configurable time period. During that period, traffic data is aggregated and stored as a single log entry.

How NetFlow flow logs work: Captured traffic is encapsulated into NetFlow packets and transmitted to your NetFlow collectors.

Supported devices

Flow logs are supported only on SAG-1000 devices running version 1.7.0 or later. If your device runs an earlier version, upgrade it first.

Fields in flow log entries

FieldDescriptionLog ServiceNetFlow
Instance_idID of the SAG instanceYesNo
snidSerial number of the SAG deviceYesNo
ali-uidID of the Alibaba Cloud accountYesNo
startStart of the log collection periodYesYes
endEnd of the log collection periodYesYes
protocolProtocol used to transfer network trafficYesYes
srcaddrSource IP addressYesYes
srcportSource portYesYes
dstaddrDestination IP addressYesYes
dstportDestination portYesYes
packetsNumber of data packetsYesYes
bytesSize of data packetsYesYes
tcp-flagsTCP flagsYesYes
tosType of service (ToS) field in the IP headerYesYes
inportID of the port that receives packetsYesYes
outportID of the port that transmits packetsYesYes
Instance_id, snid, and ali-uid are not supported by NetFlow flow logs.

Get started

Follow these steps to start capturing flow log data:

  1. Create a flow log — choose Log Service or a NetFlow collector as the storage target. The storage target determines the flow log type. See Create a flow log.

  2. Associate the flow log with an SAG instance — after creation, associate the flow log with an SAG instance to start capturing its traffic. See Associate a flow log with an SAG instance.

  3. Query flow log data — analyze captured traffic to monitor network activity, reduce costs, and troubleshoot errors. See Query flow log data.