<?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[Auto apply Rules bases on SNMP Value]]></title><description><![CDATA[<p dir="auto">Hi Guys,</p>
<p dir="auto">First off, great program. I have been using it for about 2 weeks. I want this to be my Dude server replacement. It has so many uses and I am very excited in what it can do.</p>
<p dir="auto">Anyways, I need some help with applying a Template.</p>
<p dir="auto">Here is my code</p>
<blockquote>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
oid = SNMPGetValue(snmp,".1.2.840.10036.3.1.2.1.3.10");	// Device name<br />
if (oid == "PowerBeam AC 500")<br />
    return true;</p>
</blockquote>
<p dir="auto">The idea is to apply the filter if the SNMP returns "PowerBeam AC 500". It does when I snmpwalk it. So there must be something wrong with how I am trying to use the script.</p>
<p dir="auto">Please help.</p>
]]></description><link>https://forum.netxms.org/topic/4808/auto-apply-rules-bases-on-snmp-value</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:09:13 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4808.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Nov 2016 10:44:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Auto apply Rules bases on SNMP Value on Mon, 23 Jan 2017 04:00:37 GMT]]></title><description><![CDATA[<p dir="auto">This worked for me:</p>
<pre><code>return $node-&gt;sysDescription like "HP*Switch*";
</code></pre>
<p dir="auto">You can replace sysDescription with other node attributes:<br />
<a href="https://wiki.netxms.org/wiki/NXSL:Node" rel="nofollow ugc">https://wiki.netxms.org/wiki/NXSL:Node</a></p>
<p dir="auto">It's an indirect SNMP call, but I thought it might help.</p>
]]></description><link>https://forum.netxms.org/post/21716</link><guid isPermaLink="true">https://forum.netxms.org/post/21716</guid><dc:creator><![CDATA[zsing82]]></dc:creator><pubDate>Mon, 23 Jan 2017 04:00:37 GMT</pubDate></item><item><title><![CDATA[Reply to Auto apply Rules bases on SNMP Value on Tue, 22 Nov 2016 09:47:13 GMT]]></title><description><![CDATA[<p dir="auto">Sure, just add some</p>
<pre><code>trace(0, "some message");
</code></pre>
<p dir="auto">Into the code, and then look at netxmsd log file.</p>
]]></description><link>https://forum.netxms.org/post/21398</link><guid isPermaLink="true">https://forum.netxms.org/post/21398</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Tue, 22 Nov 2016 09:47:13 GMT</pubDate></item><item><title><![CDATA[Reply to Auto apply Rules bases on SNMP Value on Tue, 22 Nov 2016 09:30:01 GMT]]></title><description><![CDATA[<p dir="auto">I have added this rule but does not seem to work. Is there a way to debug these rules to see output?</p>
]]></description><link>https://forum.netxms.org/post/21397</link><guid isPermaLink="true">https://forum.netxms.org/post/21397</guid><dc:creator><![CDATA[francoism]]></dc:creator><pubDate>Tue, 22 Nov 2016 09:30:01 GMT</pubDate></item><item><title><![CDATA[Reply to Auto apply Rules bases on SNMP Value on Mon, 21 Nov 2016 13:02:53 GMT]]></title><description><![CDATA[<p dir="auto">Here is a script with error handling and a bit better recognition (using regex ~= rather then just total comparison ==)</p>
<pre><code>oid = ".1.2.840.10036.3.1.2.1.3.10.0";

tube = CreateSNMPTransport($node);
if (tube == null)
  return false;

value = SNMPGetValue(tube, oid);
if (value == null)
  return false;

return value ~= "PowerBeam AC 500";
</code></pre>
]]></description><link>https://forum.netxms.org/post/21393</link><guid isPermaLink="true">https://forum.netxms.org/post/21393</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Mon, 21 Nov 2016 13:02:53 GMT</pubDate></item></channel></rss>