<?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[trasnformation scripts]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">i am creating snmp traps for my ups and in some field i receive numbers as values.<br />
i want to be able to transform this values to text according to the number.<br />
for ex. 0=true 1=false</p>
<p dir="auto">how do i do that ?<br />
through snmp configuration ?<br />
through event configuration ?<br />
is it possible ?</p>
<p dir="auto">Regards,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/topic/4966/trasnformation-scripts</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 15:51:30 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4966.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Mar 2017 16:38:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to trasnformation scripts on Tue, 21 Mar 2017 08:35:05 GMT]]></title><description><![CDATA[<p dir="auto">hi victor,</p>
<p dir="auto">thank you for answering.<br />
i know i say it a lot but every time i have to script something it comes back again. how can you help us know what you know ?<br />
can you think of a way to insert this information in way that i will be able to think of it my self</p>
<p dir="auto">Best Regards,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/post/21999</link><guid isPermaLink="true">https://forum.netxms.org/post/21999</guid><dc:creator><![CDATA[lindeamon]]></dc:creator><pubDate>Tue, 21 Mar 2017 08:35:05 GMT</pubDate></item><item><title><![CDATA[Reply to trasnformation scripts on Mon, 20 Mar 2017 21:05:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you can transform it when form event message. Instead of %1, %2, etc. for inserting trap parameters you can use macro %[script_name], and create appropriate script in script library. Whatever this script returns will be inserted. For example, if you have parameter 2 set to either 0 or 1 and you want to return true/false, you can create script like this:</p>
<pre><code>switch($event-&gt;parameters[2])
{
   case 0:
      return "true";
   case 1:
      return "false";
}

return "unknown";
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/21994</link><guid isPermaLink="true">https://forum.netxms.org/post/21994</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 20 Mar 2017 21:05:32 GMT</pubDate></item></channel></rss>