Zabbix - 解決方案 - 監控TCP連線數-Windows
阿新 • • 發佈:2021-10-25
參考文件:Zabbix Share - Template TCP/UDP Windows connections
1. 下載Template檔案
https://share.zabbix.com/index.php?option=com_mtree&task=att_download&link_id=796&cf_id=40
2.配置Zabbix agent檔案
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"
3.重啟zabbix agent
net stop "Zabbix Agent"
net start "Zabbix Agent"