参考文档:Zabbix Share - Template TCP/UDP Windows connections
https://share.zabbix.com/index.php?option=com_mtree&task=att_download&link_id=796&cf_id=40
Timeout=30 # 设置超时时间 UnsafeUserParameters=1 # 开启脚本运行功能 UserParameter=sockstat.sockets, netstat -ano | find /V "hola" /C UserParameter=sockstat.tcp.inuse, netstat -ano | findstr ESTABLISHED # 采集监控详细信息,不建议使用,增加传输数据大小 UserParameter=sockstat.tcp.inuse.count, netstat -ano | find /C "ESTABLISHED" UserParameter=sockstat.tcp.orphan, netstat -ano | findstr CLOSE_WAIT # 采集监控详细信息,不建议使用,增加传输数据大小 UserParameter=sockstat.tcp.orphan.count, netstat -ano | find /C "CLOSE_WAIT" UserParameter=sockstat.tcp.timewait, netstat -ano | findstr TIME_WAIT # 采集监控详细信息,不建议使用,增加传输数据大小 UserParameter=sockstat.tcp.timewait.count, netstat -ano | find /C "TIME_WAIT" UserParameter=sockstat.tcp.allocated, netstat -ano | findstr LISTENING # 采集监控详细信息,不建议使用,增加传输数据大小 UserParameter=sockstat.tcp.allocated.count, netstat -ano | find /C "LISTENING" UserParameter=sockstat.udp.inuse, netstat -ano | findstr UDP # 采集监控详细信息,不建议使用,增加传输数据大小 UserParameter=sockstat.udp.inuse.count, netstat -ano | find /C "UDP"
net stop "Zabbix Agent" net start "Zabbix Agent"