<?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 create a common DCI for different vendors?]]></title><description><![CDATA[<p dir="auto">We have many different vendors equipment in our network that have different OID's for the same value<br />
I.e. radio frequency on cambium ePMP radio's is a different OID to Ubiquiti AirFiber for example<br />
I have created templates for all the radio's, and they all pull the data for each vendor/model</p>
<p dir="auto">However I want to have a common DCI for all of them, so that when I run scripts or summary tables I can use a common 'Center Frequency' DCI and not have to create 1 for all the different DCI's<br />
If this makes any sense?<br />
How do I go about that? I'm guessing I have to create another DCI with type Script and then have a script run and find which DCI's exist on that node and use it? But I don't know the correct way to do this without causing potential script errors</p>
]]></description><link>https://forum.netxms.org/topic/6983/how-to-create-a-common-dci-for-different-vendors</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:27:24 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6983.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Mar 2021 00:57:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to create a common DCI for different vendors? on Mon, 15 Mar 2021 08:06:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you could choose OID right before doing actual SNMP request in script DCI - so no extra SNMP requests will be done. Like this:</p>
<pre><code>switch($node-&gt;vendor)
{
   case "Mikrotik":
      switch($node-&gt;productName)
      {
         case "60ghz": oid = ".1.3.6.1.4.1.14988.1.1.1.8.1.6.1";
      }
      break;
   case "Ubiquity":
      switch($node-&gt;productName)
      {
         case "AirMAX": oid = ".1.3.6.1.4.1.41112.1.4.1.1.4.1";
         case "AirFiber": oid = ".1.3.6.1.4.1.41112.1.3.1.1.5.1";
      }
      break;
}

if (oid == null)
   return null;  // OID was not selected, null will mark DCI as unsupported

snmp = $node-&gt;createSNMPTransport();
if (snmp == null)
   abort;
return SNMPGetValue(snmp, oid);
</code></pre>
<p dir="auto">This of course relies on correctly set vendor and product name values. This should be the case for Mikrotik devices, but may not be for Ubiquity - you should double check.</p>
<p dir="auto">Alternative approach could be probing for different OIDs in configuration poll hook andd setting correct OID as node's custom attribute, and then use it in script DCI. For example:</p>
<p dir="auto">HOOK::ConfigurationPoll:</p>
<pre><code>oids = %( ".1.3.6.1.4.1.41112.1.4.1.1.4.1", ".1.3.6.1.4.1.41112.1.3.1.1.5.1", ".1.3.6.1.4.1.14988.1.1.1.8.1.6.1" );
snmp = $node-&gt;createSNMPTransport();
if (snmp != null)
{
   for(oid : oids)
   {
      if (SNMPGetValue(snmp, oid) != null)  // You may use more sophisticated checks here if needed
      {
          selectedOID = oid;
          break;
      }
   }
}
SetCustomAttribute($node, "WirelessCenterFrequencyOID", selectedOID);
</code></pre>
<p dir="auto">and script DCI:</p>
<pre><code>oid = GetCustomAttribute($node, "WirelessCenterFrequencyOID");
if (oid == null)
   return null;  // No OID selected, mark as unsupported
snmp = $node-&gt;createSNMPTransport();
if (snmp == null)
   abort;
return SNMPGetValue(snmp, oid);
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/29712</link><guid isPermaLink="true">https://forum.netxms.org/post/29712</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 15 Mar 2021 08:06:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to create a common DCI for different vendors? on Thu, 11 Mar 2021 08:10:07 GMT]]></title><description><![CDATA[<p dir="auto">Is there a way to either 'discover' if an OID returns a valid result and if so, use it? I.e. that way I can create a 'Wireless - ALL' template that applies to every single radio in our network, and the same DCI applies to them, but it sets the OID correctly (I don't think I want to use a script type DCI though because it would create a lot of unnecessary SNMP polling on every poll)</p>
<p dir="auto">Alternatively can I again create a 'Wireless - ALL' template and create an additional script type DCI, and it simply checks for which DCI's already exist? Or better yet, detects the device make/model (already do that with specific templates for all the manufacturers/models we use) and then points to the appropriate DCI?</p>
<p dir="auto">Just not sure how to go about it. My pseudo-code I imagine looking something like this</p>
<pre><code>if DeviceManufacturer == "Ubiquiti" then...
...if DeviceModelType == "AirMAX" then use the value from DCI with OID .1.3.6.1.4.1.41112.1.4.1.1.4.1
...if DeviceModelType == "AirFiber" then use the value from DCI with OID .1.3.6.1.4.1.41112.1.3.1.1.5.1
if DeviceManufacturer == "MikroTik" then...
...if DeviceModelType == "60ghz" then use the value from DCI with OID .1.3.6.1.4.1.14988.1.1.1.8.1.6.1
etc etc
</code></pre>
<p dir="auto">So that way every radio ends up with 2 DCI's<br />
1 with the correctly applied OID from the discovery script for that specific make/model<br />
And another with the name of "Radio (Universal) - Tx Frequency"</p>
]]></description><link>https://forum.netxms.org/post/29698</link><guid isPermaLink="true">https://forum.netxms.org/post/29698</guid><dc:creator><![CDATA[Millenium7]]></dc:creator><pubDate>Thu, 11 Mar 2021 08:10:07 GMT</pubDate></item><item><title><![CDATA[Reply to How to create a common DCI for different vendors? on Wed, 10 Mar 2021 18:31:19 GMT]]></title><description><![CDATA[<p dir="auto">I see two options here:</p>
<ol>
<li>
<p dir="auto">Use regular expression for DCI matching in summary table to match all possible OID options. This will work only for summary tables though.</p>
</li>
<li>
<p dir="auto">Create script DCI that will request correct OID depending on device type. For example:</p>
</li>
</ol>
<pre><code>oid = ".1.3.6.1.2.1.1.1.0";
snmp = $node-&gt;createSNMPTransport();
if (snmp == null)
   abort;
return SNMPGetValue(snmp, oid);
</code></pre>
<p dir="auto">You can replace direct OID assignment in first line with actual logic for selecting correct OID.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/29694</link><guid isPermaLink="true">https://forum.netxms.org/post/29694</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 10 Mar 2021 18:31:19 GMT</pubDate></item></channel></rss>