Closed ycg closed 4 years ago
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:16:3e:16:c5:c3 brd ff:ff:ff:ff:ff:ff inet 192.168.0.XXX/24 brd 192.168.0.255 scope global dynamic eth0 valid_lft 312342259sec preferred_lft 312342259sec
if ip4 := ip.To4(); ip4 != nil {
switch {
case ip4[0] == 10:
return false
case ip4[0] == 172 && ip4[1] >= 16 && ip4[1] <= 31:
return false
case ip4[0] == 192 && ip4[1] == 168:
return false
default:
return true
}
}
我看代码是吧192.168给排除掉了,是这个意思吗
case ip4[0] == 192 && ip4[1] == 168: return false
目前注释这两行,然后编译解决,😄
因为排除了本地网卡
clickhouse_sinker_parse_timespan{instance="unknown",job="clickhouse_sinker",task="rta_11",quantile="0.5"} 4.34e-07
主机是阿里云ECS,这个可以解决吗