<?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[Instance discovery.]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">Could use help with dci instance discovery.</p>
<p dir="auto">I have 2 Mikrotik wifi devices where i would like to poll ssid name. On one device it reports with .1.3.6.1.4.1.14988.1.1.1.3.1.4.1 on another one with .1.3.6.1.4.1.14988.1.1.1.3.1.4.2. The end number is changing. How can i discover that dynamicaly?</p>
<p dir="auto">Egert</p>
]]></description><link>https://forum.netxms.org/topic/7516/instance-discovery.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:30:40 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7516.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Sep 2022 10:45:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Instance discovery. on Tue, 20 Sep 2022 10:32:13 GMT]]></title><description><![CDATA[<p dir="auto">Yes, you can use snmpwalk from nxsl script, e.g.</p>
<pre><code>transport = CreateSNMPTransport($node);
if (transport != null) {
    oid = ".1.2.840.10036.1.1.1.7";
    vars = SNMPWalk(transport, oid);
    if (vars != null) {
      foreach (v: vars) {
          println(v-&gt;name." = ".v-&gt;value);
      }
    }
}
</code></pre>
<p dir="auto">Then you just need some logic how to parse the results returned by SNMPWalk</p>
]]></description><link>https://forum.netxms.org/post/31884</link><guid isPermaLink="true">https://forum.netxms.org/post/31884</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 20 Sep 2022 10:32:13 GMT</pubDate></item><item><title><![CDATA[Reply to Instance discovery. on Fri, 16 Sep 2022 08:37:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">i Did exactly as in picture, but for me i dont see any dci discoveries for some reason.</p>
<p dir="auto">Edit:<br />
When i move the dci directly to node then it works, but under template it doesn't. Maybe it needs longer time?</p>
<p dir="auto">Edit:<br />
After waitng for hour and no dci-s from template appeared. i deleted template and made it again, this time dci-s started apearing and it seems to work.</p>
<p dir="auto">Second question. I have script to filter what nodes get applied to template. How can i improve on it to match different oid endings and not manualy add them?</p>
<pre><code>if( $node-&gt;isSNMP ) {

    if( $node-&gt;sysDescription like "*RouterOS *" &amp;&amp; ($node-&gt;name like "*[Ap] *") ) {

        transport = CreateSNMPTransport($node);
        if ( transport == null ) return NULL;

        ssid = SNMPGetValue(transport,".1.3.6.1.4.1.14988.1.1.1.3.1.4.1");
        freq = SNMPGetValue(transport,".1.3.6.1.4.1.14988.1.1.1.3.1.7.1");

        ssidB = SNMPGetValue(transport,".1.3.6.1.4.1.14988.1.1.1.3.1.4.2");
        freqB = SNMPGetValue(transport,".1.3.6.1.4.1.14988.1.1.1.3.1.7.2");

        if(ssid != null &amp;&amp; freq != null) {
            return true;
        }else if(ssidB != null &amp;&amp; freqB != null) {
            return true;
        }
    }
}


return false;
</code></pre>
]]></description><link>https://forum.netxms.org/post/31873</link><guid isPermaLink="true">https://forum.netxms.org/post/31873</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Fri, 16 Sep 2022 08:37:46 GMT</pubDate></item><item><title><![CDATA[Reply to Instance discovery. on Fri, 16 Sep 2022 04:25:58 GMT]]></title><description><![CDATA[<p dir="auto">Pls see DCI configuration in the attached images. It will perform SNMP walk starting from specified OID and create DCIs for all OIDs encountered in this walk. {instance} macro will contain last part of OID, {instance-name} - value from that OID.</p>
<p dir="auto">My Mikrotik device has two items there:<br />
.1.3.6.1.4.1.14988.1.1.1.3.1.4.1<br />
.1.3.6.1.4.1.14988.1.1.1.3.1.4.2<br />
so two DCIs would been created.</p>
<p dir="auto">The other approach is to make a script DCI, perform SNMP walk from the script and may be join results into one DCI. I can prepare example of this if needed.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005779-Screenshot_at_2022-09-16_07-18-15.png" alt="Screenshot at 2022-09-16 07-18-15.png" class="img-markdown  img-fluid" width="929" height="731" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000005780-Screenshot_at_2022-09-16_07-18-40.png" alt="Screenshot at 2022-09-16 07-18-40.png" class="img-markdown  img-fluid" width="928" height="732" /></p>
]]></description><link>https://forum.netxms.org/post/31872</link><guid isPermaLink="true">https://forum.netxms.org/post/31872</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 16 Sep 2022 04:25:58 GMT</pubDate></item></channel></rss>