<?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 bind and auto apply script]]></title><description><![CDATA[<p dir="auto">Hello again.</p>
<p dir="auto">I am trying to prove automatic template application and automatic node binding to containers based on filters (node name begins with "FG100A") and do not work none of these filters:<br />
 </p>
<blockquote>
<p dir="auto">sub main()<br />
{<br />
return left($1,6) = "FG100A" ? 1 : 0;<br />
}</p>
</blockquote>
<blockquote>
<p dir="auto">sub main()<br />
{<br />
return left($node,6) = "FG100A" ? 1 : 0;<br />
}</p>
</blockquote>
<blockquote>
<p dir="auto">sub main()<br />
{<br />
return left($node,6) = "FG100A" ? $node : 0;<br />
}</p>
</blockquote>
<p dir="auto">What is wrong?<br />
Thanks in advanced</p>
]]></description><link>https://forum.netxms.org/topic/613/auto-bind-and-auto-apply-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:21:31 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/613.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 May 2009 09:30:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Auto bind and auto apply script on Tue, 02 Nov 2010 08:18:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">There are documentation chapter about scripting language itself, and reference for all functions. However, writing transformation and filtering script are not covered. I'll try to add additional information on this topic to documentation.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/4582</link><guid isPermaLink="true">https://forum.netxms.org/post/4582</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 02 Nov 2010 08:18:03 GMT</pubDate></item><item><title><![CDATA[Reply to Auto bind and auto apply script on Fri, 29 Oct 2010 10:41:25 GMT]]></title><description><![CDATA[<p dir="auto">is this scripting stuff documented somewhere? Because I can't find it..<br />
i'm trying to figure out how it works, but it's tough to find resources about auto bind filters etc. etc.</p>
]]></description><link>https://forum.netxms.org/post/4578</link><guid isPermaLink="true">https://forum.netxms.org/post/4578</guid><dc:creator><![CDATA[possamai]]></dc:creator><pubDate>Fri, 29 Oct 2010 10:41:25 GMT</pubDate></item><item><title><![CDATA[Reply to Auto bind and auto apply script on Sat, 13 Jun 2009 12:51:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Auto bind/apply occurs during configuration polls. You can force configuration poll for specific node from console (via Poll -&gt; Configuration menu), or decrease interval between configuration polls by changing server's parameter ConfigurationPollingInterval.</p>
<p dir="auto">Attributes of node object:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>name</th>
<th>Node name</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>Object identifier</td>
</tr>
<tr>
<td>status</td>
<td>Node status (0 = Normal, 1 = Warning, 2 = Minor, 3 = Major, 4 = Critical, 5 = Unknown, 6 = Unmanaged)</td>
</tr>
<tr>
<td>ipAddr</td>
<td>Node primary IP address (as text string, like 10.2.1.4)</td>
</tr>
<tr>
<td>isAgent</td>
<td>Agent presense flag: 1 if NetXMS agent present on node, 0 if not</td>
</tr>
<tr>
<td>isSNMP</td>
<td>SNMP support flag: 1 if SNMP is supported by node, 0 if not</td>
</tr>
<tr>
<td>isBridge</td>
<td>Bridge flag: 1 if node is bridge or switch, 0 if not</td>
</tr>
<tr>
<td>isRouter</td>
<td>IP router flag: 1 if node is Ip router (can forward IP packets), 0 if not</td>
</tr>
<tr>
<td>isPrinter</td>
<td>Printer flag: 1 if node detected to be a network printer, 0 if not</td>
</tr>
<tr>
<td>isCDP</td>
<td>CDP (Cisco Discovery Protocol) support flag: 1 node supports CDP, 0 if not</td>
</tr>
<tr>
<td>isSONMP</td>
<td>SONMP (SynOptics Network Management Protocol) support flag: 1 node supports SONMP, 0 if not</td>
</tr>
<tr>
<td>isLLDP</td>
<td>LLDP (Link Layer Discovery Protocol) support flag: 1 node supports LLDP, 0 if not</td>
</tr>
<tr>
<td>snmpVersion</td>
<td>SNMP version used for communication with node's SNMP agent</td>
</tr>
<tr>
<td>snmpOID</td>
<td>SNMP object ID</td>
</tr>
<tr>
<td>agentVersion</td>
<td>NetXMS agent version (as string, like 0.2.26)</td>
</tr>
<tr>
<td>platformName</td>
<td>Platform name, as returned by NetXMS agent (for example, windows-i386)</td>
</tr>
</tbody>
</table>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/3095</link><guid isPermaLink="true">https://forum.netxms.org/post/3095</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sat, 13 Jun 2009 12:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Auto bind and auto apply script on Thu, 14 May 2009 10:02:02 GMT]]></title><description><![CDATA[<p dir="auto">Ok. Thanks for the explanation.  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /><br />
Now it complete auto bind/apply. But it takes a few minutes. Is there any parameter in server configuration that I can setting to make it faster?</p>
<blockquote>
<p dir="auto">...$node variable is an object, and you need to compare it's name attribute.</p>
</blockquote>
<p dir="auto">What other attributes for $node object? Some other usefull objects-&gt;attributes for auto bind/apply operations?</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://forum.netxms.org/post/2953</link><guid isPermaLink="true">https://forum.netxms.org/post/2953</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Thu, 14 May 2009 10:02:02 GMT</pubDate></item><item><title><![CDATA[Reply to Auto bind and auto apply script on Wed, 13 May 2009 11:57:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">You should use == for compare operation. = is an assignment operation.</p>
<p dir="auto">For example:</p>
<pre><code>a = 1
</code></pre>
<p dir="auto">means "assign value 1 to variable a"</p>
<p dir="auto">and</p>
<pre><code>a == 1
</code></pre>
<p dir="auto">means "test if variable's value is 1".</p>
<p dir="auto">Second error is that $node variable is an object, and you need to compare it's name attribute. To access it, use</p>
<pre><code>$node-&gt;name
</code></pre>
<p dir="auto">And compare always returns 1 or 0, so you can omit ? 1 : 0 part and simply use</p>
<pre><code>left($node-&gt;name,6) == "FG100A"
</code></pre>
<p dir="auto">So, correct script will looks like</p>
<pre><code>sub main()
{
   return left($node-&gt;name, 6) == "FG100A";
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/2951</link><guid isPermaLink="true">https://forum.netxms.org/post/2951</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 13 May 2009 11:57:12 GMT</pubDate></item></channel></rss>