Ad Widget

Collapse

How to monitor TCP connection state on windows server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Illum8
    Junior Member
    • Sep 2019
    • 3

    #1

    How to monitor TCP connection state on windows server?

    Hello,

    In order not to lose your time, right to the point. I have many Windows servers. To monitor TCP parameters (TCP Socket stats/connections/Network segments). I used this topic:

    Each time you have to go to the windows server and register user parameters. I also used the powershell script, but I also have to go to each server, and I have more and more of them. Is it possible to configure this check in all respects on a zabbix server so that it is not necessary to go to every windows server? I would really appreciate any help. Maybe someone has already come across. P.S. Sorry for my bad english
  • sancho
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2015
    • 295

    #2
    Hi Illum8 ,

    One option may be the following:

    1º create a file called for example "userparameter_tcp.conf" where you add the parameters:

    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"
    2º You create an Action of Auto registration for windows servers that automatically add the template.

    With this, the only thing you would have to do is copy the file "userparameter_tcp.conf" to the zabbix_agentd.d folder that must be in the folder where the agent is installed, or the path you have configured in the "include" section of zabbix_agentd .conf.
    The copy could be automated through a script or from the action itself through a Remote commands operation.

    I hope it helps you.

    Sorry for my google english

    Comment

    • Illum8
      Junior Member
      • Sep 2019
      • 3

      #3
      Originally posted by sancho
      Hi Illum8 ,

      One option may be the following:

      1º create a file called for example "userparameter_tcp.conf" where you add the parameters:



      2º You create an Action of Auto registration for windows servers that automatically add the template.

      With this, the only thing you would have to do is copy the file "userparameter_tcp.conf" to the zabbix_agentd.d folder that must be in the folder where the agent is installed, or the path you have configured in the "include" section of zabbix_agentd .conf.
      The copy could be automated through a script or from the action itself through a Remote commands operation.

      I hope it helps you.

      Sorry for my google english
      Thank you, I’ll try.
      If it will work I will write.

      Comment

      Working...