<?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[Help with $node->platform in Automatic Apply Rules (template) script ?]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I do have some Templates with DCIs that I wish to monitor on some nodes that has NetXMS agent installed.<br />
I have simple script that will automatically apply templates to nodes who has NetXMS Agent installed, my current script inside Template - Automatic Apply Rules is:</p>
<pre><code>sub main() {
	return $node-&gt;isAgent;
}
</code></pre>
<p dir="auto">This script works and solves the problem.</p>
<p dir="auto">However, I can not find proper documentation for $node object and its attributes / methods.<br />
I need to write different script for my different template which will check if $node - platform name, contains string "windows" then to automatically apply different template.</p>
<p dir="auto">Please help me with simple if expression, contains (or RegExp) and how to get platform name from $node object ?</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.netxms.org/topic/3141/help-with-node-platform-in-automatic-apply-rules-template-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:25:49 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3141.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 May 2014 17:34:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help with $node->platform in Automatic Apply Rules (template) script ? on Thu, 08 May 2014 13:52:55 GMT]]></title><description><![CDATA[<p dir="auto">Description of node class is here: <a href="http://wiki.netxms.org/wiki/NXSL:Node" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL:Node</a> and all scripting reference information is here: <a href="http://wiki.netxms.org/wiki/Scripting_Guide" rel="nofollow ugc">http://wiki.netxms.org/wiki/Scripting_Guide</a></p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13843</link><guid isPermaLink="true">https://forum.netxms.org/post/13843</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 08 May 2014 13:52:55 GMT</pubDate></item></channel></rss>