[ZBXNEXT-2083] New item to monitor tcp connections Created: 2013 Dec 20  Updated: 2024 Apr 10  Resolved: 2021 Sep 06

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Templates (T)
Affects Version/s: 2.0.10
Fix Version/s: 5.0.15rc1, 5.4.4rc1, 6.0.0alpha1, 6.0 (plan)

Type: New Feature Request Priority: Minor
Reporter: Marc Assignee: Michael Veksler
Resolution: Duplicate Votes: 7
Labels: networkmonitoring, newitemkey, tcp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File Template Module Linux network connections by Zabbix agent (LLD).xml    
Issue Links:
Sub-task
depends on ZBXNEXT-6688 New items for Agent and Agent2 Closed
Epic Link: NewAgentItems
Team: Team B
Sprint: Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020), Sprint 66 (Jul 2020), Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021)
Story Points: 0.5

 Description   

Would be nice to have an item that queries /proc/net/tcp and /proc/net/tcp6 for at least source/destination ip addresses or port numbers.
For now I use vfs.file.regexp[] but that's not very comfortable nor easy to interpreted by others.



 Comments   
Comment by Marc [ 2013 Dec 20 ]

/proc/net/tcp* would work on linux only.
of course it would be great to have this item implemented for any supported platform.

Comment by richlv [ 2013 Dec 20 ]

can you provide some examples of what exactly should be supported ?

Comment by Marc [ 2013 Dec 21 ]

Sure

Aim is to have a very efficient way to check for tcp connections. For Linux one could parse files provided by tcp_diag.

46:77D8B85D:9C4C 6A97A345:1770 01 
|  |        |    |        |    |--> connection state
|  |        |    |        |-------> remote TCP port number
|  |        |    |----------------> remote IPv4 address
|  |        |---------------------> local TCP port number
|  |------------------------------> local IPv4 address
|---------------------------------> number of entry

For now I'm used to use vfs.file.regmatch[*]. But that's whether comfortable nor clear to others:

# while IFS=. read a b c d; do printf '%X%X%X%X\n' $d $c $b $a; done <<< 69.163.151.106
6A97A345
# printf '%X\n' 6000
1770

Does any IPv4 connection in any state to or from ip address 69.163.151.106 exist?

vfs.file.regmatch[/proc/net/tcp,6A97A345]

Does any established IPv4 connection to remote ip address 69.163.151.106 and port 6000 exist?

vfs.file.regmatch[/proc/net/tcp,"[[:alnum:]]{8}:[[:alnum:]]{4} 6A97A345:1770 01"]

Now what I like to have is a platform independent way to achieve the same, similar to this:

net.tcp.conn[<lip>,<lport>,<rip>,<rport>,<state>,<mode>]
net.tcp.conn[,,69.163.151.10[678],,established,exist]
net.tcp.conn[,,69.163.151.107,,,count]
Comment by Constantin Oshmyan [ 2021 Aug 30 ]

Excuse me, please; but at the moment this issue has "Status: Done", but "Resolution: Unresolved".
It's unclear: will this feature request be implemented or not? What is its real state?

Comment by Michael Veksler [ 2021 Aug 30 ]

Dear constantin.oshmyan, the current ticket is part of main ticket ZBXNEXT-6688 and was closed as completed because ZBXNEXT-6688 was closed.

Comment by Constantin Oshmyan [ 2021 Aug 30 ]

MVekslers, thank you for explanation!

Generated at Wed May 07 09:02:42 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.