<?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[Read text file and count matched items]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">As a new user to NetXMS I still cannot believe just how easy it is to use.  I have been looking for a replacement to the old RRD based systems for a while and this is blowing everything else away.  I just have a couple of things I am struggling to get worked out (custom scripting seems the way to go with these) that I would like to iron out before I add it to my production.  I have split them in to two posts to keep it simpler.</p>
<p dir="auto">This topic is about reading data from a text file.  I am using MikroTik APs managed from a central device.  It is possible, using SNMP, to get a count of all clients attached across all the radios but I am looking to go in to more detail, e.g. clients per radio or clients per SSID.  I cannot get this from SNMP so have scripted the MikroTik to dump a text file at regular intervals listing the SSID and radio ID for each active client.  Here is an example of what it looks like.</p>
<pre><code>ssid1::cap001-1
ssid1::cap001-2
ssid1::cap002-1
ssid1::cap002-2
ssid1::cap001-2
ssid1::cap001-1
ssid1::cap002-2
ssid1::cap001-2
ssid2::cap002-1-1
ssid2::cap001-2-1
</code></pre>
<p dir="auto">The big question is how can I filter that in to results.  So maybe counting all the lines containing cap001 or cap001-2 (for the specific radio in a dual band device) or even more granular for ssid1::cap001-2 for all client connected to that SSID on that band on that radio.</p>
<p dir="auto">Anything to point me in the right direction would be appreciated.</p>
<p dir="auto">Many thanks.</p>
]]></description><link>https://forum.netxms.org/topic/4512/read-text-file-and-count-matched-items</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:23:00 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4512.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jun 2016 19:55:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 14:02:27 GMT]]></title><description><![CDATA[<p dir="auto">Genius! Thank you. Tested that and it all started working.  Switched CheckTrustedNodes back to 1 and added Trusted Nodes to the node containing the DCI and that is working now too.  It seems slightly strange, however, that to use the -o option to send a value for the node doing the actual sending requires it to list itself in Trusted Nodes.</p>
<p dir="auto">Thanks again <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="🙂" /><br />
P</p>
]]></description><link>https://forum.netxms.org/post/20094</link><guid isPermaLink="true">https://forum.netxms.org/post/20094</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Thu, 09 Jun 2016 14:02:27 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 13:49:52 GMT]]></title><description><![CDATA[<p dir="auto">Check your &quot;CheckTrustedNodes&quot; server config variable (set it to 0 and restart server).<br />
I have a feeling we are running into an issue with security here.</p>
<p dir="auto"><a href="https://wiki.netxms.org/wiki/SG:Security_Issues" rel="nofollow ugc">https://wiki.netxms.org/wiki/SG:Security_Issues</a></p>
]]></description><link>https://forum.netxms.org/post/20093</link><guid isPermaLink="true">https://forum.netxms.org/post/20093</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 09 Jun 2016 13:49:52 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 13:08:44 GMT]]></title><description><![CDATA[<p dir="auto">I have spun up another box in case there was a problem with something on it and can now get data from, for example,</p>
<pre><code>nxapush param1=4
</code></pre>
<p dir="auto">Still cannot get anything using -o to push on behalf of another node.  I can work around this but it would nice if I could work it as it would keep a cleaner config.</p>
<p dir="auto">Thanks for your help.</p>
]]></description><link>https://forum.netxms.org/post/20091</link><guid isPermaLink="true">https://forum.netxms.org/post/20091</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Thu, 09 Jun 2016 13:08:44 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 12:44:15 GMT]]></title><description><![CDATA[<p dir="auto">Object ID in this case = Node ID.</p>
]]></description><link>https://forum.netxms.org/post/20090</link><guid isPermaLink="true">https://forum.netxms.org/post/20090</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 09 Jun 2016 12:44:15 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 12:43:00 GMT]]></title><description><![CDATA[<p dir="auto">I am using the paramater not description so should be good there.  Can you confirm which ID the object ID is, please?  Is it the ID of the DCI?</p>
]]></description><link>https://forum.netxms.org/post/20089</link><guid isPermaLink="true">https://forum.netxms.org/post/20089</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Thu, 09 Jun 2016 12:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 12:42:26 GMT]]></title><description><![CDATA[<p dir="auto">It works fine for me:</p>
<pre><code>nxapush -o 4535 test-param=test
</code></pre>
<p dir="auto">Its Object ID and DCI Parameter (NOT Description).</p>
]]></description><link>https://forum.netxms.org/post/20088</link><guid isPermaLink="true">https://forum.netxms.org/post/20088</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 09 Jun 2016 12:42:26 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 12:12:29 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for replying.  I have tried now with -o using DCI ID and node ID but neither is working still.</p>
]]></description><link>https://forum.netxms.org/post/20087</link><guid isPermaLink="true">https://forum.netxms.org/post/20087</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Thu, 09 Jun 2016 12:12:29 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 11:47:38 GMT]]></title><description><![CDATA[<p dir="auto">You need to specify object ID for which this data is being pushed for.</p>
<p dir="auto">Example:</p>
<pre><code>nxapush -o 1001 some_dci=2
</code></pre>
]]></description><link>https://forum.netxms.org/post/20085</link><guid isPermaLink="true">https://forum.netxms.org/post/20085</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 09 Jun 2016 11:47:38 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Thu, 09 Jun 2016 11:25:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am having trouble getting the push DCIs to receive values.  I followed these steps so far.</p>
<ol>
<li>Set your DCI’s origin to Push Agent and configure other properties as usual, excluding polling interval which is meaningless in case of pushed data.</li>
<li>Create separate user account or pick an existing one and give “Push Data” access right on the DCI owning node to that user.</li>
<li>Use nxapush utility for pushing data.</li>
</ol>
<p dir="auto">I have tried nxapush with and without the user account I created, e.g.:</p>
<pre><code>./nxapush param1=5
</code></pre>
<p dir="auto">and</p>
<pre><code>./nxapush -u user -P password param1=5
</code></pre>
<p dir="auto">but I do not get any data in NetXMS.  I have used tcpdump on the agent and server machines (both Ubuntu) and can see the data bent sent and received by the OS.  I have also tried the same commands using nxapush on the NetXMS server too.</p>
<p dir="auto">If I run nxapush with -vv I get only one line out saying 'Connected to NetXMS agent' and that is all (was expecting a full debug).</p>
<p dir="auto">I guess I'm missing something but I cannot work out what.  Can anyone give me some guidance, please?</p>
<p dir="auto">Thanks in advance,<br />
P</p>
]]></description><link>https://forum.netxms.org/post/20083</link><guid isPermaLink="true">https://forum.netxms.org/post/20083</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Thu, 09 Jun 2016 11:25:36 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Tue, 07 Jun 2016 20:58:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/20058">Read text file and count matched items</a>:</p>
<blockquote>
<p dir="auto">You can actually get per-ssid client-count on MikroTik.<br />
Check out the .1.3.6.1.4.1.14988.1.1.1.3.1.6 tree.<br />
(each SSID has its own instance, and then client count as value)</p>
</blockquote>
<p dir="auto">Hi Tomas, thanks for replying.  This OID does not work when the APs are centrally managed, only on standalone access points.  I will try to track down the documentation for nxapush and give it a try.  Thanks.</p>
]]></description><link>https://forum.netxms.org/post/20059</link><guid isPermaLink="true">https://forum.netxms.org/post/20059</guid><dc:creator><![CDATA[squeezypiano]]></dc:creator><pubDate>Tue, 07 Jun 2016 20:58:07 GMT</pubDate></item><item><title><![CDATA[Reply to Read text file and count matched items on Tue, 07 Jun 2016 20:15:33 GMT]]></title><description><![CDATA[<p dir="auto">You can actually get per-ssid client-count on MikroTik.<br />
Check out the .1.3.6.1.4.1.14988.1.1.1.3.1.6 tree.<br />
(each SSID has its own instance, and then client count as value)</p>
<p dir="auto">As for per wireless card, I dont have a multi-card MirkoTik to test with, but from memory, I think you can get per-card clients as well.</p>
<p dir="auto">To your actual request tho, you can use 'nxapush' utility from the script which generates the files for you to push the data directly into NetXMS DCIs.<br />
Or even 'ExternalParametersProvider' to provide a whole bunch of values as DCIs through the Agent.</p>
<p dir="auto">Documentation for both is available on the forums and/or the wiki.</p>
]]></description><link>https://forum.netxms.org/post/20058</link><guid isPermaLink="true">https://forum.netxms.org/post/20058</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Tue, 07 Jun 2016 20:15:33 GMT</pubDate></item></channel></rss>