代码拉取完成,页面将自动刷新
English version goes here
go run watch.go mynet.go
GOOS=windows GOARCH=amd64 go build watch.go mynet.go
GOOS=linux GOARCH=amd64 go build watch.go mynet.go
####配置文件
这个文件里配置的是查询网络信息所需要的命令,放go可执行文件同级目录
ss -n sport == #{port} |
awk '
BEGIN{up=0;down=0;n=0;c1=0;c2=0;c3=0;c4=0;c5=0;c6=0;}
{up+=$3};
{down+=$4};
{n+=1}
{if($0~"ESTAB") c1+=1};
{if($0~"CLOSE-WAIT") c2+=1};
{if($0~"TIME-WAIT") c3+=1};
{if($0~"CLOSE"&&!$0~"CLOSE-WAIT") c4+=1};
{if($0~"LISTEN") c5+=1};
{if($0~"CLOSING") c6+=1};
END {print up,down,n,c1,c2,c3,c4,c5,c6}
'
#post uri
server-uri: http://10.0.0.26:14047/umc/basic
#physical
physical:
#delay(ms)
delay: 10000
#network card
net: en0
gatherPort: 22,9092
解释:
server-uri:服务请求地址
delay:提交频率
net:网卡名,根据这个去找ip和mac,找不到会主动报错
gatherPort:网络信息采集的端口,逗号分割
####服务端
opentsdb:
url: http://10.0.0.57
port: 4242
解释:
url:opentsdb服务请求地址
port:opentsdb服务请求端口
####opentsdb部署相关
注:尝试过从官网下tar包,也尝试过从github上拉代码,都出现些许问题,自己编译有一定的风险
最终使用下载rpm包来安装
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。