<?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[Interface names in instance discovery]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">I've seen a number of posts around this topic, but I'm having trouble getting this to work. </p>
<p dir="auto">Problem: when I create a DCI that uses instance discovery (eg: ifInOctets) I can't seem to get the interface description into the name of the DCI.</p>
<p dir="auto">I've tried using the %{script:xxxxx} approach in the DCI name, but I can't find out how to pass {instance} as a parameter to the script and $dci appears to not be set in the script.<br />
I've tried using the return %(true,"&lt;interface_name&gt;") method in the instance filter, but this breaks the {instance} value for the OID.</p>
<p dir="auto">Any help on a working solution?</p>
<p dir="auto">Here's an example of my current DCI config:</p>
<p dir="auto">Description: Input Bandwidth (bps) on {instance}<br />
SNMP OID: .1.3.6.1.2.1.2.2.1.10.{instance}<br />
Transformation: Delta/sec, and $1 * 8 in the script<br />
Instance discovery: SNMP walk of OID .1.3.6.1.2.1.2.2.1.10</p>
<p dir="auto">Thanks,<br />
Richard</p>
]]></description><link>https://forum.netxms.org/topic/3551/interface-names-in-instance-discovery</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:38:58 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3551.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Jan 2015 23:23:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Interface names in instance discovery on Mon, 10 Sep 2018 17:12:03 GMT]]></title><description><![CDATA[<p dir="auto">Let me summarize to make it easy for other beginners like me:<br />
for inward traffic (using the 64bit snmp oid)</p>
<p dir="auto">In "Data Collection Confiugration:"</p>
<p dir="auto">Description: Traffic on {instance-name} - bits/s IN<br />
Parameter: .1.3.6.1.2.1.31.1.1.1.6.{instance}<br />
Origin: SNMP - Unsigned Int 64bit</p>
<p dir="auto">Transformation: Average delta per sec<br />
Transform script: $1 * 8</p>
<p dir="auto">Instance discovery: SNMP Walk - OIDs<br />
Base SNMP OID: .1.3.6.1.2.1.31.1.1.1.1<br />
Instance discovery script: return %(true, $1, $2);</p>
<p dir="auto">For OUT traffic just change:<br />
Description: Traffic on {instance-name} - bits/s OUT<br />
Parameter: .1.3.6.1.2.1.31.1.1.1.10.{instance}</p>
]]></description><link>https://forum.netxms.org/post/24799</link><guid isPermaLink="true">https://forum.netxms.org/post/24799</guid><dc:creator><![CDATA[sarangtc]]></dc:creator><pubDate>Mon, 10 Sep 2018 17:12:03 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Sat, 24 Oct 2015 08:51:19 GMT]]></title><description><![CDATA[<p dir="auto">Also as a side note to discussion about returning interface names.</p>
<p dir="auto">"SNMPWalk - OIDs" now actually returns value of the OID as $2.</p>
<p dir="auto">So now, script can look like this:</p>
<p dir="auto">Instance discovery: SNMP Walk - OIDs<br />
Base SNMP OID: .1.3.6.1.2.1.31.1.1.1.1</p>
<p dir="auto">Instance discovery script:</p>
<pre><code>return %(true, $1, $2);
</code></pre>
<p dir="auto">So NetXMS will push to the script $1 as discovered instance (same as before), but now $2 is pushed to the script as the value of that OID automatically.<br />
This makes the above script possible, and you dont have to use CreateSNMPTransport or GetInterfaceObject anymore.</p>
]]></description><link>https://forum.netxms.org/post/18102</link><guid isPermaLink="true">https://forum.netxms.org/post/18102</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Sat, 24 Oct 2015 08:51:19 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Sat, 24 Oct 2015 08:44:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">try to use {instance} in graph title - it should be replaced with the value seen in Thresholds -&gt; Instance in DCI properties.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/18101</link><guid isPermaLink="true">https://forum.netxms.org/post/18101</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sat, 24 Oct 2015 08:44:54 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Thu, 22 Oct 2015 11:47:38 GMT]]></title><description><![CDATA[<p dir="auto">Very nice......<br />
but.....<br />
how do i get the "instance name when" i use this DCIs as title in the Performance tab?</p>
<p dir="auto">"%{node-name} {node-name}" doesn't work.</p>
<p dir="auto">Greeting from Germany<br />
Ludger</p>
]]></description><link>https://forum.netxms.org/post/18088</link><guid isPermaLink="true">https://forum.netxms.org/post/18088</guid><dc:creator><![CDATA[LBKRE]]></dc:creator><pubDate>Thu, 22 Oct 2015 11:47:38 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Fri, 16 Jan 2015 05:44:05 GMT]]></title><description><![CDATA[<p dir="auto">I wonder is there any reasons left to use snmp transport in such cases. We can get all interesting information from $node object and its child interfaces:</p>
<pre><code>i = GetInterfaceObject($node, $1);
if (i != null &amp;&amp; i-&gt;adminState == 1)
{
  return %(true, $1, i-&gt;name);
}
return false;
</code></pre>
]]></description><link>https://forum.netxms.org/post/15724</link><guid isPermaLink="true">https://forum.netxms.org/post/15724</guid><dc:creator><![CDATA[glebofff]]></dc:creator><pubDate>Fri, 16 Jan 2015 05:44:05 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Fri, 16 Jan 2015 01:05:09 GMT]]></title><description><![CDATA[<p dir="auto">Perfect.  Thanks Tomaskir.  Now that you pointed this out, I found it in the docs <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="🙂" />  Works like a charm.</p>
<p dir="auto">Regards,<br />
Richard</p>
]]></description><link>https://forum.netxms.org/post/15721</link><guid isPermaLink="true">https://forum.netxms.org/post/15721</guid><dc:creator><![CDATA[rgkordia]]></dc:creator><pubDate>Fri, 16 Jan 2015 01:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to Interface names in instance discovery on Sat, 24 Oct 2015 08:52:22 GMT]]></title><description><![CDATA[<p dir="auto">UPDATE: Please see this post:<br />
<a href="https://www.netxms.org/forum/configuration/interface-names-in-instance-discovery/msg18102/#msg18102" rel="nofollow ugc">https://www.netxms.org/forum/configuration/interface-names-in-instance-discovery/msg18102/#msg18102</a></p>
<p dir="auto">Description: Traffic on {instance-name} - bits/s IN<br />
Parameter: .1.3.6.1.2.1.31.1.1.1.6.{instance}<br />
Origin: SNMP - Unsigned Int 64bit</p>
<p dir="auto">Transformation: Average delta per sec<br />
Transform script: <code>return $1 * 8;</code></p>
<p dir="auto">Instance discovery: SNMP Walk - OIDs<br />
Base SNMP OID: .1.3.6.1.2.1.2.2.1.1<br />
Instance discovery script:</p>
<pre><code>transport = CreateSNMPTransport($node);
if (transport == null)
	return false;

// get the interface name to return as instance-name
vb = SNMPGet(transport, ".1.3.6.1.2.1.31.1.1.1.1." . $1);
if (vb == null)
	return false;

// filter out loopback
if (vb-&gt;value == "lo")
	return false;

return %(true, $1, vb-&gt;value);
</code></pre>
<p dir="auto">Please note the node has to support the IfXTable for this script to work.</p>
]]></description><link>https://forum.netxms.org/post/15716</link><guid isPermaLink="true">https://forum.netxms.org/post/15716</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Sat, 24 Oct 2015 08:52:22 GMT</pubDate></item></channel></rss>