<?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[using DCI attributes within transformation script]]></title><description><![CDATA[<p dir="auto">Hello together,</p>
<p dir="auto">is there a way to use attributes of the current DCI within a transformationscript?</p>
<p dir="auto">For example getting the name-attribute and building out of this an oid with an value that was requested in an other DCI.</p>
<p dir="auto">Best regards</p>
<p dir="auto">Georg</p>
]]></description><link>https://forum.netxms.org/topic/1974/using-dci-attributes-within-transformation-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:35:21 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1974.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Oct 2012 14:29:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to using DCI attributes within transformation script on Thu, 13 Dec 2012 20:46:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gkaudewitz" aria-label="Profile: gkaudewitz">@<bdi>gkaudewitz</bdi></a> said in <a href="/post/9128">using DCI attributes within transformation script</a>:</p>
<blockquote>
<p dir="auto">Is the $dci object added in final version of 1.2.4?</p>
</blockquote>
<p dir="auto">and in 1.2.4 added multipliers for charts.</p>
<p dir="auto">and y need only transform bytes to bites</p>
]]></description><link>https://forum.netxms.org/post/9133</link><guid isPermaLink="true">https://forum.netxms.org/post/9133</guid><dc:creator><![CDATA[SKYnv]]></dc:creator><pubDate>Thu, 13 Dec 2012 20:46:24 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Thu, 13 Dec 2012 17:13:34 GMT]]></title><description><![CDATA[<p dir="auto">Yes, it is available in 1.2.4.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/9130</link><guid isPermaLink="true">https://forum.netxms.org/post/9130</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 13 Dec 2012 17:13:34 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Thu, 13 Dec 2012 16:42:26 GMT]]></title><description><![CDATA[<p dir="auto">Is the $dci object added in final version of 1.2.4?</p>
]]></description><link>https://forum.netxms.org/post/9128</link><guid isPermaLink="true">https://forum.netxms.org/post/9128</guid><dc:creator><![CDATA[gkaudewitz]]></dc:creator><pubDate>Thu, 13 Dec 2012 16:42:26 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Mon, 15 Oct 2012 16:05:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gkaudewitz" aria-label="Profile: gkaudewitz">@<bdi>gkaudewitz</bdi></a> said in <a href="/post/8748">using DCI attributes within transformation script</a>:</p>
<blockquote>
<p dir="auto">Now we have same understanding of my problem.<br />
Thanks for the information concerning $dci.<br />
This will simplify the tasks concerning calculation of values for me. Because I don't want generating an extra snmprequest each time the octet-value is requested.</p>
<p dir="auto">Thanks for the help!</p>
</blockquote>
<p dir="auto">if portspeed is constant you can write array with each port information in the script.</p>
]]></description><link>https://forum.netxms.org/post/8749</link><guid isPermaLink="true">https://forum.netxms.org/post/8749</guid><dc:creator><![CDATA[SKYnv]]></dc:creator><pubDate>Mon, 15 Oct 2012 16:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Mon, 15 Oct 2012 14:09:29 GMT]]></title><description><![CDATA[<p dir="auto">Now we have same understanding of my problem.<br />
Thanks for the information concerning $dci.<br />
This will simplify the tasks concerning calculation of values for me. Because I don't want generating an extra snmprequest each time the octet-value is requested.</p>
<p dir="auto">Thanks for the help!</p>
]]></description><link>https://forum.netxms.org/post/8748</link><guid isPermaLink="true">https://forum.netxms.org/post/8748</guid><dc:creator><![CDATA[gkaudewitz]]></dc:creator><pubDate>Mon, 15 Oct 2012 14:09:29 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Fri, 12 Oct 2012 13:59:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gkaudewitz" aria-label="Profile: gkaudewitz">@<bdi>gkaudewitz</bdi></a> said in <a href="/post/8735">using DCI attributes within transformation script</a>:</p>
<blockquote>
<p dir="auto">Not really what I want to do.<br />
Within transformationscript some pseudocode now<br />
sub main()<br />
{<br />
  pos = rindex(trim($dci-&gt;name),".");<br />
  len = length(trim($dci-&gt;name)) - pos;<br />
  port = right($dci-&gt;name,len);<br />
  snmpoid = ".1.3.6.1.2.1.2.2.1.5.".port;<br />
  speed = GetDCIValueByName($node,snmpoid);<br />
  result = (($1*8)*100)/speed;<br />
  return result;<br />
}</p>
<p dir="auto">the meaning of $dci in this example would be the same as with $node refering to the current DCI.</p>
</blockquote>
<p dir="auto">$dci object added in <a href="http://svn.netxms.org/public/netxms/trunk/ChangeLog" rel="nofollow ugc">1.2.4 dev version</a><br />
how get snmp y see in my script.<br />
i'm recomend write script in script library and using functions with "use" operator.</p>
]]></description><link>https://forum.netxms.org/post/8737</link><guid isPermaLink="true">https://forum.netxms.org/post/8737</guid><dc:creator><![CDATA[SKYnv]]></dc:creator><pubDate>Fri, 12 Oct 2012 13:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Fri, 12 Oct 2012 11:01:01 GMT]]></title><description><![CDATA[<p dir="auto">Not really what I want to do.<br />
Within transformationscript some pseudocode now<br />
sub main()<br />
{<br />
  pos = rindex(trim($dci-&gt;name),".");<br />
  len = length(trim($dci-&gt;name)) - pos;<br />
  port = right($dci-&gt;name,len);<br />
  snmpoid = ".1.3.6.1.2.1.2.2.1.5.".port;<br />
  speed = GetDCIValueByName($node,snmpoid);<br />
  result = (($1*8)*100)/speed;<br />
  return result;<br />
}</p>
<p dir="auto">the meaning of $dci in this example would be the same as with $node refering to the current DCI.</p>
]]></description><link>https://forum.netxms.org/post/8735</link><guid isPermaLink="true">https://forum.netxms.org/post/8735</guid><dc:creator><![CDATA[gkaudewitz]]></dc:creator><pubDate>Fri, 12 Oct 2012 11:01:01 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Fri, 12 Oct 2012 09:34:40 GMT]]></title><description><![CDATA[<p dir="auto">mmm?</p>
<pre><code>sub main()
{
  if ($node-&gt;isSNMP)
  {
   transport = CreateSNMPTransport($node);
    if (transport == null)
    {
    return -1;
    }

    ifspeed = SNMPGetValue(transport, ".1.3.6.1.2.1.2.2.1.5.10201"); // get if speed

    if (ifspeed != null)
    {
        //you can use "case/switch" if have y have many params
        if (ifspeed == "blablabla") //change blabla bla string. see mib, i don't know how it on cisco
        {
           return (($1*8)/(1 &lt;&lt; 20)); //transform bytes to megabites
        }
        else
        {
           return $1; //return default value
        }
    }
  }
}
</code></pre>
]]></description><link>https://forum.netxms.org/post/8734</link><guid isPermaLink="true">https://forum.netxms.org/post/8734</guid><dc:creator><![CDATA[SKYnv]]></dc:creator><pubDate>Fri, 12 Oct 2012 09:34:40 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Fri, 12 Oct 2012 09:00:37 GMT]]></title><description><![CDATA[<p dir="auto">Sorry but I hove to clarify the question. I want to do the following with the Transformatinscript of the DCI</p>
<p dir="auto">I have an DCI with parameter:<br />
.1.3.6.1.2.1.31.1.1.1.10.10201<br />
from that parameter/name I want to build the parameter<br />
.1.3.6.1.2.1.2.2.1.5.10201<br />
to find the corresponding DCI by GetDCIValueByName that has requested the interface speed.<br />
With this information I want to calculate the percentage value for the usage of the interface within the transformormationscript.</p>
]]></description><link>https://forum.netxms.org/post/8733</link><guid isPermaLink="true">https://forum.netxms.org/post/8733</guid><dc:creator><![CDATA[gkaudewitz]]></dc:creator><pubDate>Fri, 12 Oct 2012 09:00:37 GMT</pubDate></item><item><title><![CDATA[Reply to using DCI attributes within transformation script on Thu, 11 Oct 2012 15:18:00 GMT]]></title><description><![CDATA[<p dir="auto">$1 - current value (last polled)<br />
if you want use another dci in curent dci see this <a href="http://wiki.netxms.org/wiki/NXSL_Function_Reference#Data_Collection" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL_Function_Reference#Data_Collection</a></p>
]]></description><link>https://forum.netxms.org/post/8726</link><guid isPermaLink="true">https://forum.netxms.org/post/8726</guid><dc:creator><![CDATA[SKYnv]]></dc:creator><pubDate>Thu, 11 Oct 2012 15:18:00 GMT</pubDate></item></channel></rss>