<?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[Problem with DCI transform script]]></title><description><![CDATA[<p dir="auto">Hey guys,</p>
<p dir="auto">I have a problem trying to transform a value which has been calculated from a script.<br />
The script calculates the average CPU load over multiple CPUs.</p>
<p dir="auto">It returns a float value (e.g. 41.34444444) which is the CPU load in percentage.<br />
For displaying the data I want to transform this value so that it is displayed as "41.34444444 %".</p>
<p dir="auto">Unfortunately the transformation doen't seem to work properly so in the object overview and in the view of last values I just see "41.34444444" (without "%").</p>
<p dir="auto">Do you know what I configured wrong?</p>
<p dir="auto">Thanks in advance.</p>
<p dir="auto">Best regards,<br />
  Danny</p>
]]></description><link>https://forum.netxms.org/topic/4854/problem-with-dci-transform-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:42:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4854.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Jan 2017 08:48:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with DCI transform script on Fri, 06 Jan 2017 13:29:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dkoppenhagen" aria-label="Profile: dkoppenhagen">@<bdi>dkoppenhagen</bdi></a> said in <a href="/post/21604">Problem with DCI transform script</a>:</p>
<blockquote>
<p dir="auto">I tried this. But it's the same result. So the "Data Type" in configuration section "General" is the type of the final values which is returned after my transformation script<br />
runs on collected data? Or is this the type if the raw data which comes from my script?</p>
</blockquote>
<p dir="auto">As per my knowledge it is the type of the final value.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dkoppenhagen" aria-label="Profile: dkoppenhagen">@<bdi>dkoppenhagen</bdi></a> said in <a href="/post/21604">Problem with DCI transform script</a>:</p>
<blockquote>
<p dir="auto">So the main problem is: I need a float for performance tab and a string for object overview.</p>
<p dir="auto">So probably I have to leave it as it is and I change just the value description from "CPU" to "CPU (%)".</p>
</blockquote>
<p dir="auto">Since you need the same result with different data type, I suggest to leave it as float and change the description (you won't be able to show in performance graph if it is a string). Another solution is to duplicate the DCI and keep one as string and the other as float, the DCI of type string can be shown in overview and the float in the performance tab, but honestly if you have many nodes in my opinion is a waste of resources.</p>
<p dir="auto">Regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/21605</link><guid isPermaLink="true">https://forum.netxms.org/post/21605</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Fri, 06 Jan 2017 13:29:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with DCI transform script on Fri, 06 Jan 2017 09:54:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi Marco thanks for your answer.</p>
<p dir="auto">I tried this. But it's the same result. So the "Data Type" in configuration section "General" is the type of the final values which is returned after my transformation script runs on collected data? Or is this the type if the raw data which comes from my script?</p>
<p dir="auto">Another thing is that I need a float value for displaying the values in performance tab.</p>
<p dir="auto">I thought it's like the following:<br />
1.) The script runs and returns value.<br />
2.) The returned values typse is selected in "Data Type".<br />
3.) The value is processed in performance tab.<br />
4.) Transformation script runs over the last value.<br />
5.) The transformed value is shown in overview and "last values" secion.</p>
<p dir="auto">So the main problem is: I need a float for performance tab and a string for object overview.</p>
<p dir="auto">So probably I have to leave it as it is and I change just the value description from "CPU" to "CPU (%)".</p>
<p dir="auto">Bets regards,<br />
Danny</p>
]]></description><link>https://forum.netxms.org/post/21604</link><guid isPermaLink="true">https://forum.netxms.org/post/21604</guid><dc:creator><![CDATA[dkoppenhagen]]></dc:creator><pubDate>Fri, 06 Jan 2017 09:54:27 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with DCI transform script on Thu, 05 Jan 2017 12:44:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dkoppenhagen" aria-label="Profile: dkoppenhagen">@<bdi>dkoppenhagen</bdi></a> said in <a href="/post/21580">Problem with DCI transform script</a>:</p>
<blockquote>
<p dir="auto">Hey guys,</p>
<p dir="auto">I have a problem trying to transform a value which has been calculated from a script.<br />
The script calculates the average CPU load over multiple CPUs.</p>
<p dir="auto">It returns a float value (e.g. 41.34444444) which is the CPU load in percentage.<br />
For displaying the data I want to transform this value so that it is displayed as "41.34444444 %".</p>
<p dir="auto">Unfortunately the transformation doen't seem to work properly so in the object overview and in the view of last values I just see "41.34444444" (without "%").</p>
<p dir="auto">Do you know what I configured wrong?</p>
<p dir="auto">Thanks in advance.</p>
<p dir="auto">Best regards,<br />
  Danny</p>
</blockquote>
<p dir="auto">What is shown depends on the type of the DCI, so "41.34444444 %" is no more a floating point value, so you have to set it as a string and in your transformation script you have to do something like this:</p>
<p dir="auto">string($1)." %"</p>
<p dir="auto">in this case $1 is the value collected, change with the result of your calculation.</p>
<p dir="auto">Regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/21585</link><guid isPermaLink="true">https://forum.netxms.org/post/21585</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Thu, 05 Jan 2017 12:44:26 GMT</pubDate></item></channel></rss>