0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

接続先別割合算出SPL 除外CIDR SRC・DEST制限付き

Last updated at Posted at 2025-03-13
index=netflow 
| lookup src.csv src_ip OUTPUT src_ip as lookup_src_ip 
| where NOT (
    cidrmatch("A1.B1.C1.D1/E1", dest_ip) OR 
    cidrmatch("A2.B2.C2.D2/E2", dest_ip) OR 
    ...
    cidrmatch("An.Bn.Cn.Dn/En", dest_ip) 
)
| where isnotnull(lookup_src_ip) AND dest_ip != lookup_src_ip 
| stats count as num_of_dest by dest_ip 
| eventstats sum(num_of_dest) as total_dest 
| eval percentage_of_dest=round(num_of_dest/total_dest*100, 2) 
| where dest_ip IN ("IP1", "IP2", "IP3", "IP4", "IP5", "IP6")
| table dest_ip, num_of_dest, percentage_of_dest
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?