Flow Logs (FL) service provides log collection, query, data management, data record, and analysis features, helping you easily perform Ops and quickly troubleshoot issues.
After a flow log is created, the log stream in the specified range (such as ENI, NAT Gateway, or cross-region CCN traffic) will be automatically collected, and the log data will be delivered to CLS for storage. In the CLS topic, each ENI has a unique log stream which contains flow log records.
The FL service for NAT Gateway and cross-region CCN traffic is currently in beta. To try it out, submit a ticket.
Flow logs are queried and consumed in CLS. CLS supports querying hundreds of millions of log data entries. You can search for data with full text or multiple keywords across topics, and the results can be returned within seconds.
FL integrates with CLS to store and manage log data.
In the logset "flowlog_logset" dedicated to flow logs, you can create a dashboard for ENI flow logs to visualize and analyze flow log data. One dashboard can be created for each log topic.
Data display in the dashboard is as shown below. For more information, see Advanced Analysis.
A flow log records the network flow that passes through the capture window and matches particular rules.
The flow logs record the network flows filtered by the "quintuple + traffic source region + traffic destination region" rule in a specific capture window; that is, only flow logs that meet the rule in the capture window can be recorded as flow logs of cross-region CCN traffic.
srcaddr dstregionid dstport start dstaddr version packets ccnid protocol srcregionid bytes action region-id srcport end log-status
|dstregionid||text||Traffic destination region.|
|dstport||long||Traffic destination port. This field will take effect only for UDP/TCP protocols and will be displayed as "-" for other protocols.|
|start||long||The timestamp when the first packet is received in the current capture window. If there are no packets in the capture window, it will be displayed as the start time of the capture window in Unix seconds.|
|version||text||Flow log version.|
|packets||long||Number of packets transferred in the capture window. This field will be displayed as "-" when |
|ccn-id||text||Unique CCN instance ID. To get the information of your CCN instance, contact us.|
|protocol||long||IANA protocol number of the traffic. For more information, see Assigned Internet Protocol Numbers.|
|srcregionid||text||Traffic source region.|
|bytes||long||Number of bytes transferred in the capture window. This field will be displayed as "-" when |
|action||text||Operation associated with the traffic:|
ACCEPT: Cross-region traffic normally forwarded over CCN.
REJECT: Cross-region traffic prevented from being forwarded due to traffic throttling.
|region-id||text||Region where logs are recorded.|
|srcport||text||Traffic source port. This field will take effect only for UDP/TCP protocols and will be displayed as "-" for other protocols.|
|end||long||The timestamp when the last packet is received in the current capture window. If there are no packets in the capture window, it will be displayed as the end time of the capture window in Unix seconds.|
|log-status||text||Logging status of the flow log. Valid values:|
OK: Data is normally logged to the specified destination.
NODATA: There was no inbound or outbound network flow in the capture window, in which case both the
A flow log records the network flow that passes through the capture window and matches the quintuple rules.
version account-id interface-id srcaddr dstaddr srcport dstport protocol packets bytes start end action log-status
|account-id||AppID of the FL account.|
|srcport||Source port of the traffic. This field indicates the ICMP ID for ICMP traffic.|
|dstport||Destination port of the traffic. This field indicates a combination of ICMP type (bits 0-7) and code (bits 8-15) for ICMP traffic.|
|protocol||IANA protocol number of the traffic. For more information, see the Assigned Internet Protocol Numbers.|
|packets||Number of packets transferred in the capture window.|
|bytes||Number of bytes transferred in the capture window.|
|start||Start time of the capture window in Unix seconds.|
|end||End time of the capture window in Unix seconds.|
|action||Traffic-related action. Valid values: |
ACCEPT: the traffic allowed by the security group or network ACL.
REJECT: the traffic rejected by the security group or network ACL.
|log-status||Logging status of the flow log. Valid values:|
OK: data is logging normally to the specified destination.
NODATA: there was no incoming or outgoing network flow in the capture window. In this case, both
SKIPDATA: some flow log records were skipped in the capture window. This may be caused by an internal capacity constraint or an internal error.
The flow log recorded when the SSH traffic (destination port: 22; TCP) of the ENI
eni-lq6mkcis under the account
1251762227 was accepted:
2 1251762227 eni-lq6mkcis 172.31.16.139 172.31.16.21 20641 22 6 20 4249 1418530010 1418530070 ACCEPT OK
The flow log recorded when the RDP traffic (destination port: 3389; TCP) of the ENI
eni-lq6mkcis under the account
1251762227 was rejected:
2 1251762227 eni-lq6mkcis 172.31.9.69 172.31.9.12 49761 3389 6 20 4249 1418530010 1418530070 REJECT OK
The flow log recorded when there was no data collected in the capture window:
V1 1251762227 eni-lq6mkcis - - - - - - - 1431280876 1431280934 - NODATA
The flow log recorded when there was data skipped in the capture window:
V1 1251762227 eni-lq6mkcis - - - - - - - 1431280876 1431280934 - SKIPDATA
Flow log record of security group and network ACL rules:
For example, if you ping your instance (private IP of the network interface: 172.31.16.139) from your home computer (IP: 203.0.113.12), and the security group's inbound rule allows the ICMP traffic while its outbound rule does not, your instance will respond to the ping command as the security group is stateful.
If your network ACL allows the inbound but rejects the outbound ICMP traffic, response to the ping command will be discarded and will not be sent to your home computer as the network ACL is stateless. In this case, the flow log has two records:
V1 1251762227 eni-lq6mkcis 203.0.113.12 172.31.16.139 0 0 1 4 336 1432917027 1432917142 ACCEPT OK
V1 1251762227 eni-lq6mkcis 172.31.16.139 203.0.113.12 0 0 1 4 336 1432917094 1432917142 REJECT OK
If your network ACL allows the outbound ICMP traffic, your flow log will have two ACCEPT records (one for sending the ping command and the other for responding). If your security group rejects the inbound ICMP traffic and the traffic does not reach your instance, the flow log has one REJECT record.