Ad Widget

Collapse

Monitoring total number of connections

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tag
    Junior Member
    • Mar 2009
    • 3

    #1

    Monitoring total number of connections

    Looking for an easy way to monitor total number of TCP connections to a host. Does the agent have any built in functionality to do this, or even seperate out ESTABLISHED, WAIT, etc. Is it possible if not, to do this without creating userparms.

    Thanks,

    Tag
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Zabbix does not have the functionality built in. You'll need to create an external script.

    netstat -t | grep ESTABLISHED | wc -l

    would give you the current number of established tcp connections (I get the feeling you may already know, but it's there in case someone else is searching).
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • jhgrc
      Member
      • Jun 2009
      • 52

      #3
      Here is a little bit more optimized version

      netstat -t -n | grep -c ESTABLISHED

      - Only 2 forks - but needs gnu grep but why not use it anyway? And it is standard on Linux.
      - Does not query DNS - so it would be faster

      Comment

      Working...