<?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 Name in DCI  through template]]></title><description><![CDATA[<p dir="auto">hi Victor,</p>
<p dir="auto">i have created  Templates</p>
<p dir="auto">Description- Traffic In {instance} (Byte/sec)<br />
Parameter-.1.3.6.1.2.1.31.1.1.1.1.{instance}    //ifName Oid<br />
Origin- SNMP<br />
Datatype- String<br />
Instance Discovery-Snmp walk-oid<br />
Base Oid-.1.3.6.1.2.1.31.1.1.1.1<br />
Polling Interval = 60 seconds</p>
<p dir="auto">transformation Script-<br />
transport = CreateSNMPTransport($node);    // Create SNMP transport for node<br />
if (transport == null)<br />
{<br />
println "Failed to create SNMP transport, exit";<br />
return 1;<br />
}<br />
trafficIn = SNMPGetValue(transport, ".1.3.6.1.2.1.31.1.1.1.6.$1");<br />
return = trafficIn;</p>
<p dir="auto">this template create DCI for the Routers in this way</p>
<p dir="auto">Description                                    Parameter                                   data Type<br />
Traffic In {instance} (Byte/sec)      .1.3.6.1.2.1.31.1.1.1.1.{instance}      String<br />
Traffic In fa0/0 (Byte/sec)              .1.3.6.1.2.1.31.1.1.1.1.fa0/0             String<br />
Traffic In fa0/1 (Byte/sec)              .1.3.6.1.2.1.31.1.1.1.1.fa0/1             String<br />
Traffic In fa0/2 (Byte/sec)              .1.3.6.1.2.1.31.1.1.1.1.fa0/2             String</p>
<p dir="auto">but when i check the DCI values. it does not collect the data shows zero for all interfaces DCI, why transformation script is not working. please correct me where i am doing wrong. please let me know if there are other way to do the same.</p>
<p dir="auto">thanks in advance,<br />
Percy</p>
]]></description><link>https://forum.netxms.org/topic/2970/interface-name-in-dci-through-template</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:19:16 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2970.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Feb 2014 07:44:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Interface Name in DCI  through template on Thu, 20 Mar 2014 18:58:37 GMT]]></title><description><![CDATA[<p dir="auto">I have found interesting function:</p>
<pre><code>http://wiki.netxms.org/wiki/NXSL:CreateDCI
</code></pre>
<p dir="auto">May be it helps...</p>
]]></description><link>https://forum.netxms.org/post/13219</link><guid isPermaLink="true">https://forum.netxms.org/post/13219</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Thu, 20 Mar 2014 18:58:37 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Fri, 07 Mar 2014 11:51:25 GMT]]></title><description><![CDATA[<p dir="auto">hi..,</p>
<p dir="auto">i tried the way you mention above but not working properly.<br />
Still i am facing the same problem in getting the port name or interface name in DCI description.</p>
<p dir="auto">percy</p>
]]></description><link>https://forum.netxms.org/post/13128</link><guid isPermaLink="true">https://forum.netxms.org/post/13128</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Fri, 07 Mar 2014 11:51:25 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Thu, 06 Mar 2014 12:04:47 GMT]]></title><description><![CDATA[<p dir="auto">Sorry I did not understand the problem.</p>
<p dir="auto">I tried to solve this with macro but not sure if instance parameter can be passed to the script...</p>
<p dir="auto">For that reason every other part of the DCI is normal:</p>
<p dir="auto">DCI:</p>
<pre><code>Description: ifDescr: %{script:ReturnIfDescr}
Parameter: .1.3.6.1.2.1.2.2.1.10.{instance} // &lt;= value InOctets for ports, taken from the .10 branch
Origin: SNMP
Datatype: Integer
Instance discovery metod: SNMP Walk - OIDs
Base SNMP OID: .1.3.6.1.2.1.2.2.1.10
</code></pre>
<p dir="auto">Script Library:<br />
ReturnIfDescr:</p>
<pre><code>transport = CreateSNMPTransport($node);
if (transport == null) return "n/a";
return SNMPGetValue(transport, ".1.3.6.1.2.1.2.2.1.2.1"); // &lt;= ifDescription of 1st port, taken from the .2 branch
</code></pre>
<p dir="auto">But this script returns only description of the first port to the macro.</p>
<p dir="auto">There should be something like this, but it does not work this way ofcourse ..</p>
<pre><code>return SNMPGetValue(transport, ".1.3.6.1.2.1.2.2.1.2.".$instance);
</code></pre>
<p dir="auto">p.s. this solution will not reflect any changes in the ifDescription though as the macro is run only when the DCI is created</p>
<p dir="auto">M.Sperl</p>
]]></description><link>https://forum.netxms.org/post/13111</link><guid isPermaLink="true">https://forum.netxms.org/post/13111</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Thu, 06 Mar 2014 12:04:47 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Tue, 04 Mar 2014 18:34:08 GMT]]></title><description><![CDATA[<p dir="auto">I had not find way to make DCI Description field another than index.  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
]]></description><link>https://forum.netxms.org/post/13064</link><guid isPermaLink="true">https://forum.netxms.org/post/13064</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Tue, 04 Mar 2014 18:34:08 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Tue, 04 Mar 2014 15:45:00 GMT]]></title><description><![CDATA[<p dir="auto">Hi, the OID range you are trying to look into is .1.3.6.1.2.1.31.1.1.1.6.x (as seen in the transformation script) but in the DCI template you have just .1.3.6.1.2.1.31.1.1.1.1.x ?</p>
<p dir="auto">And the Datatype in the DCI template configuration should be Integer, not String (not sure if it is the main problem though).</p>
<p dir="auto">M.Sperl</p>
]]></description><link>https://forum.netxms.org/post/13063</link><guid isPermaLink="true">https://forum.netxms.org/post/13063</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Tue, 04 Mar 2014 15:45:00 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Fri, 28 Feb 2014 08:17:15 GMT]]></title><description><![CDATA[<p dir="auto">hi,<br />
thanks for the Reply... i have tried this still not working...<br />
i think problem is here<br />
in this $1 = fa0/0, fa0/1 and so on<br />
trafficIn = SNMPGetValue(transport, ".1.3.6.1.2.1.31.1.1.1.6.fa0/0); but when we select walk with this OId it give result like this<br />
.1.3.6.1.2.1.31.1.1.1.6.1    125824582<br />
.1.3.6.1.2.1.31.1.1.1.6.2    112124548<br />
.1.3.6.1.2.1.31.1.1.1.6.3    152548225</p>
<p dir="auto">here {instance} is an Index i.e integer value but we are passing string fa0/0</p>
<p dir="auto">when i change the Parameter Oid IfName to ifIndex than DCI doesnot show the Interface Name...but give the Values for the DCI.<br />
in this case DCI doesnot shows the interface Name</p>
<p dir="auto">Description                                    Parameter                                   data Type<br />
Traffic In {instance} (Byte/sec)      .1.3.6.1.2.1.2.2.1.1.{instance}    integer<br />
Traffic In 1 (Byte/sec)                   .1.3.6.1.2.1.2.2.1.1.1                 integer<br />
Traffic In 2 (Byte/sec)                   .1.3.6.1.2.1.2.2.1.1.2                 integer<br />
Traffic In 3 (Byte/sec)                   .1.3.6.1.2.1.2.2.1.1.3                 integer</p>
<p dir="auto">difficult to find the DCI for the Interface Inteface fa0/1 or if there are many Interfaces difficult to find the DCI for the particular inteface.</p>
<p dir="auto">Regards.<br />
Percy</p>
]]></description><link>https://forum.netxms.org/post/13043</link><guid isPermaLink="true">https://forum.netxms.org/post/13043</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Fri, 28 Feb 2014 08:17:15 GMT</pubDate></item><item><title><![CDATA[Reply to Interface Name in DCI  through template on Fri, 28 Feb 2014 07:51:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/percy" aria-label="Profile: percy">@<bdi>percy</bdi></a> said in <a href="/post/13041">Interface Name in DCI  through template</a>:</p>
<blockquote>
<p dir="auto">trafficIn = SNMPGetValue(transport, ".1.3.6.1.2.1.31.1.1.1.6.$1");</p>
</blockquote>
<p dir="auto">I am not shure, but try to change to:</p>
<pre><code>trafficIn = SNMPGetValue(transport, ".1.3.6.1.2.1.31.1.1.1.6." . $1);
</code></pre>
]]></description><link>https://forum.netxms.org/post/13042</link><guid isPermaLink="true">https://forum.netxms.org/post/13042</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Fri, 28 Feb 2014 07:51:56 GMT</pubDate></item></channel></rss>