zabbix_export: version: '5.4' date: '2021-11-21T21:26:48Z' groups: - uuid: 7df96b18c230490a9a0a9e2307226338 name: Templates templates: - uuid: 1babea6c0ed1453c9c95c71a602fd79e template: 'Sockstat Statistics Windows' name: 'TCP/UDP Stats Windows' description: | ## Overview Starting from the template that they published in: I have modified the parameters for use in Windows. For it to work, add the following lines in UserParameter of zabbix\_agent.conf 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" Restart Zabbix agent ## Author Sancho groups: - name: Templates items: - uuid: bfdd2642ad8b40babf38a1875d179d0d name: 'Total Sockets' key: sockstat.sockets delay: '60' history: 3d trends: 7d units: sockets description: 'Number of open sockets' tags: - tag: Application value: 'Network Sockets' - uuid: 2d2e6a622ef8455ebfd060eb26d28b5c name: 'TCP Sockets in LISTENING' key: sockstat.tcp.allocated delay: '60' history: 1d trends: '0' value_type: LOG tags: - tag: Application value: 'Network Sockets' - uuid: e7b70505a52a474b8bf9d8239819a7a5 name: 'TCP Sockets in LISTENING Count' key: sockstat.tcp.allocated.count delay: '60' history: 3d trends: 7d units: sockets tags: - tag: Application value: 'Network Sockets' - uuid: 1b759576cf0043338799717418b10bed name: 'TCP Sockets In ESTABLISHED' key: sockstat.tcp.inuse delay: '60' history: 1d trends: '0' value_type: LOG description: 'TCP sockets currently in use on the system.' tags: - tag: Application value: 'Network Sockets' - uuid: 0d0d94a69dd445e790381b006ab3957d name: 'TCP Sockets in ESTABLISHED Count' key: sockstat.tcp.inuse.count delay: '60' history: 3d trends: 7d units: sockets tags: - tag: Application value: 'Network Sockets' - uuid: 05b8a180f2dc4c08bf8737539e67241e name: 'TCP Sockets in CLOSE_WAIT' key: sockstat.tcp.orphan delay: '60' history: 1d trends: '0' value_type: LOG tags: - tag: Application value: 'Network Sockets' - uuid: e0ab5857063c408e84db89f159377649 name: 'TCP Sockets in CLOSE_WAIT Count' key: sockstat.tcp.orphan.count delay: '60' history: 3d trends: 7d units: sockets tags: - tag: Application value: 'Network Sockets' - uuid: 0590e0e012e14b7294dd76114e2bd9c7 name: 'TCP Sockets in TIME_WAIT' key: sockstat.tcp.timewait delay: '60' history: 1d trends: '0' value_type: LOG tags: - tag: Application value: 'Network Sockets' - uuid: 3fefcf460ef84bcd8a4a60fddaf6058b name: 'TCP Sockets in TIME_WAIT Count' key: sockstat.tcp.timewait.count delay: '60' history: 3d trends: 7d units: sockets tags: - tag: Application value: 'Network Sockets' - uuid: eb5a02a130a1460c8c7d93d051ddcf95 name: 'UDP Sockets In Use' key: sockstat.udp.inuse delay: '60' history: 1d trends: '0' value_type: LOG tags: - tag: Application value: 'Network Sockets' - uuid: 9d77fb84368e4132812be2cec2d0a7b3 name: 'UDP Sockets In Use Count' key: sockstat.udp.inuse.count delay: '60' history: 3d trends: 7d units: sockets tags: - tag: Application value: 'Network Sockets' graphs: - uuid: 484626a13615473f861712e1e68cd131 name: 'TCP Status' ymin_type_1: FIXED graph_items: - color: DDDD00 item: host: 'Sockstat Statistics Windows' key: sockstat.tcp.orphan.count - sortorder: '1' color: 00CC00 item: host: 'Sockstat Statistics Windows' key: sockstat.udp.inuse.count - sortorder: '2' color: 2774A4 item: host: 'Sockstat Statistics Windows' key: sockstat.tcp.inuse.count - sortorder: '3' color: A54F10 item: host: 'Sockstat Statistics Windows' key: sockstat.tcp.allocated.count - sortorder: '4' color: EE0000 item: host: 'Sockstat Statistics Windows' key: sockstat.tcp.timewait.count - sortorder: '5' color: '777777' item: host: 'Sockstat Statistics Windows' key: sockstat.sockets