<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to Count/Graph/Check TCP connection States Table with NetXMS, ...]]></title><description><![CDATA[<p dir="auto">Useful for:</p>
<ul>
<li>monitoring number of connections to specific TCP port</li>
<li>checking if service is listening on specific port</li>
<li>statistics of TCP connections table</li>
<li>checking load on specific service as number of connections</li>
<li>detecting TCP connection state based attacks and abnormalities</li>
</ul>
<p dir="auto">Requirements:</p>
<ul>
<li>agent on *nix system with net-snmp tools</li>
<li>bash,grep,cat,snmpnetstat</li>
</ul>
<p dir="auto">Links:<br />
<a href="http://net-snmp.sourceforge.net/docs/man/snmpnetstat.html" rel="nofollow ugc">http://net-snmp.sourceforge.net/docs/man/snmpnetstat.html</a><br />
snmp_stat.sh attached</p>
<p dir="auto">How-to:<br />
1.<br />
configure agent on node that has snmp connection to nodes you want to monitor:<br />
ExternalParameter = TCP.Connections(*):/opt/netxms/scripts/snmp_stat.sh $1 $2 $3 $4</p>
<ol start="2">
<li></li>
</ol>
<p dir="auto">add nodes you want to monitor to trusted nodes on that node</p>
<ol start="3">
<li></li>
</ol>
<p dir="auto">parameters:<br />
# $1 = hostname, monitored node ip<br />
# $2 = community, monitored node snmp community string<br />
# $3 = TCP state {ESTABLISHED|LISTEN|TIMEWAIT|TIMECLOSE|FINWAIT1|FINWAIT2|SYNSENT|SYNRECV}<br />
# $4 = TCP port for detailed {ESTABLISHED|LISTEN}</p>
<ol start="4">
<li></li>
</ol>
<p dir="auto">configure DCI's on node you want to monitor and specify node from 1.<br />
as proxy node when creating DCI</p>
<ol start="5">
<li>examples DCI's:</li>
</ol>
<p dir="auto"># all established connections<br />
TCP.Connections(192.168.1.1,public,ESTABLISHED)</p>
<p dir="auto"># all established connections to TCP port 80<br />
TCP.Connections(192.168.1.1,public,ESTABLISHED,80)</p>
<p dir="auto"># will return 1 if service is listening on TCP port 25<br />
TCP.Connections(192.168.1.1,public,LISTEN,25)</p>
<p dir="auto">Feel free to use. Suggestions, spelling <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> and bug fixes welcome.</p>
<p dir="auto">Ales</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000000136-snmp_stat.sh">snmp_stat.sh</a></p>
]]></description><link>https://forum.netxms.org/topic/419/how-to-count-graph-check-tcp-connection-states-table-with-netxms-...</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:35:13 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/419.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jul 2008 17:27:44 GMT</pubDate><ttl>60</ttl></channel></rss>