ss sock监控抓取

Falcon指标如下:

 

 Zabbix实现方式:

[root@kvm-10-128-52-177 zabbix_agent2.d]# cat ss_socket.conf 
UserParameter=ss.estab,ss -s |grep estab|awk {'print $4'}|sed 's/,//g'
UserParameter=ss.closed,ss -s |grep estab|awk {'print $6'}|sed 's/,//g'
UserParameter=ss.orphaned,ss -s |grep estab|awk {'print $8'}|sed 's/,//g'
UserParameter=ss.synrecv,ss -s |grep estab|awk {'print $10'}|sed 's/,//g'
UserParameter=ss.timewait,ss -s |grep estab|awk {'print $12'}|awk -F"/" {'print $1'}
UserParameter=ss.slabinfo.timewait,ss -s |grep estab|awk {'print $12'}|awk -F"/" {'print $2'}|sed 's/),//g'

  

posted @ 2022-04-25 16:24  摩天居士-谢烟客  阅读(59)  评论(0编辑  收藏  举报