Query VPC flow logs in Cloudwatch insights

0

I'm trying to figure out how much traffic is going to a 10.25.x.x via our VPC flow logs. How can I do that in Cloudwatch Insights? I can't work out how to get 10.25.* to query

AWS
전문가
질문됨 4년 전2177회 조회
1개 답변
1
수락된 답변

There are two ways to do it, you can use the like clause on the filter like in the following example:

fields @timestamp, srcAddr
| sort @timestamp desc
| limit 20
| filter srcAddr like "10.25."

Second option is to use one of the ip functions to check to see if the ip address is in the subnet and in your case the subnet you need is 10.25.0.0/16

fields @timestamp, srcAddr
| sort @timestamp desc
| limit 20
| filter isIpv4InSubnet(srcAddr,"10.25.0.0/16")

Addtionally, here is a query that returns total bytes directed at the range of destination IPs in your range:

stats sum(bytes)
| sort @timestamp desc
| filter isIpv4InSubnet(dstAddr,"10.25.0.0/16")
AWS
전문가
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인