diff --git a/message/trident.proto b/message/trident.proto index 2bf226bf714..bda831d5e77 100644 --- a/message/trident.proto +++ b/message/trident.proto @@ -162,7 +162,14 @@ message Config { optional uint32 sync_interval = 4 [default = 60]; optional uint32 stats_interval = 5 [default = 60]; optional uint64 global_pps_threshold = 6 [default = 200000]; - optional string tap_interface_regex = 8 [default = "^(tap|cali|veth|eth|en[ospx]).*"]; + // qemu: tap.* + // localhost: lo + // common nic: eth|en[ospx].* + // flannel: veth.* + // calico: cali.* + // cilium: lxc.* + // kube-ovn: [0-9a-f]+_h$ + optional string tap_interface_regex = 8 [default = "^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo|[0-9a-f]+_h)$"]; optional string host = 9; // override statsd host tag optional bool rsyslog_enabled = 10 [default = true]; optional uint32 output_vlan = 11 [default = 0]; diff --git a/server/controller/common/vtap_config.go b/server/controller/common/vtap_config.go index 5b2fc173348..bd072838f4e 100644 --- a/server/controller/common/vtap_config.go +++ b/server/controller/common/vtap_config.go @@ -88,7 +88,7 @@ var ( RsyslogEnabled = 1 MaxTxBandwidth = int64(0) BandwidthProbeInterval = 10 - TapInterfaceRegex = "^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo)$" + TapInterfaceRegex = "^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo|[0-9a-f]+_h)$" MaxEscapeSeconds = 3600 Mtu = 1500 OutputVlan = 0 diff --git a/server/controller/service/vtap_group_config_example.go b/server/controller/service/vtap_group_config_example.go index 69c8249698f..91bac709b7f 100644 --- a/server/controller/service/vtap_group_config_example.go +++ b/server/controller/service/vtap_group_config_example.go @@ -49,8 +49,15 @@ thread_threshold: 500 process_threshold: 10 # 基础配置参数 -# 采集网口,默认值:^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo)$,长度范围[0, 65535] -tap_interface_regex: ^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo)$ +# 采集网口,默认值:^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo|[0-9a-f]+_h)$,长度范围[0, 65535] +# qemu: tap.* +# localhost: lo +# common nic: eth|en[ospx].* +# flannel: veth.* +# calico: cali.* +# cilium: lxc.* +# kube-ovn: [0-9a-f]+_h$# +tap_interface_regex: ^(tap.*|cali.*|veth.*|eth.*|en[ospx].*|lxc.*|lo|[0-9a-f]+_h)$ # 流量过滤,默认值:空,表示全采集,长度范围[1, 512] # 请参考BPF语法:https://biot.com/capstats/bpf.html capture_bpf: