<?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[Suggestion - Apply template to containers]]></title><description><![CDATA[<p dir="auto">I'm starting to use NetXMS and when I populated the network I decided to put each node in containers corresponding to its physical location's neighborhood. The problem was: when I tried to apply templates to the nodes I couldn't just select the containers which had the nodes, I had to open every container and select each node manually.<br />
This sure isn't a big deal, but this kind of work can be time-consuming, monotonous and tiring when dealing with large networks. I mean, imagine selecting 2000 nodes manualy without being able to just select first, hold Shift and select last?<br />
So my suggestion would be to add the possibility to apply a template to all the nodes that are children of a container by selecting the container itself.<br />
For example, if I have the following directory subtree:</p>
<p dir="auto">Infrastructure Services</p>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>_Container A</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td>_Container B</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td>_node 1</td>
</tr>
<tr>
<td></td>
<td></td>
<td>_node 2</td>
</tr>
<tr>
<td></td>
<td></td>
<td>_node 3</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td>_Container C</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td>_node 4</td>
</tr>
<tr>
<td></td>
<td>_node 5</td>
</tr>
</tbody>
</table>
<p dir="auto">|<br />
Templates</p>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>_Template T</td>
</tr>
</tbody>
</table>
<p dir="auto">And tried to apply template T to directory A, T would be applied to all nodes from node1 to node5.<br />
What do you think?</p>
<p dir="auto">Thank you,</p>
<p dir="auto">Jhúlia Graziella</p>
]]></description><link>https://forum.netxms.org/topic/3755/suggestion-apply-template-to-containers</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:06:01 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3755.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 May 2015 14:00:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 19:26:57 GMT]]></title><description><![CDATA[<p dir="auto">Great.  That works.  I had tried that, but I guess never with the right syntax.</p>
]]></description><link>https://forum.netxms.org/post/20503</link><guid isPermaLink="true">https://forum.netxms.org/post/20503</guid><dc:creator><![CDATA[aarb00]]></dc:creator><pubDate>Thu, 28 Jul 2016 19:26:57 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 17:41:29 GMT]]></title><description><![CDATA[<p dir="auto">Try setting "CheckTrustedNodes" to 0 in Server Configuration and restarting the server.</p>
<p dir="auto">Here is a Wiki article on the topic:<br />
<a href="https://wiki.netxms.org/wiki/SG:Security_Issues" rel="nofollow ugc">https://wiki.netxms.org/wiki/SG:Security_Issues</a></p>
]]></description><link>https://forum.netxms.org/post/20499</link><guid isPermaLink="true">https://forum.netxms.org/post/20499</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 28 Jul 2016 17:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 17:18:40 GMT]]></title><description><![CDATA[<p dir="auto">That didn't fix it for me.  I must be doing something else wrong. </p>
<p dir="auto">Please find attached screen shot. </p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003084-Screenshot_from_2016-07-28_12-17-14.png" alt="Screenshot from 2016-07-28 12-17-14.png" class="img-markdown  img-fluid" width="712" height="362" /></p>
]]></description><link>https://forum.netxms.org/post/20498</link><guid isPermaLink="true">https://forum.netxms.org/post/20498</guid><dc:creator><![CDATA[aarb00]]></dc:creator><pubDate>Thu, 28 Jul 2016 17:18:40 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 16:04:15 GMT]]></title><description><![CDATA[<p dir="auto">Oops, there was indeed a syntax error.</p>
<p dir="auto">Fixed the script in the original post, please try it.</p>
]]></description><link>https://forum.netxms.org/post/20496</link><guid isPermaLink="true">https://forum.netxms.org/post/20496</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 28 Jul 2016 16:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 14:57:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/16794">Suggestion - Apply template to containers</a>:</p>
<blockquote>
<p dir="auto">This is already entirely possible.</p>
<p dir="auto">Simply use auto-bind scripts...<br />
Here is an example:</p>
<pre><code>parents = GetNodeParents($node);

foreach(p : parents)
{
  // if the node has a parent with this name
  if (p-&gt;name == "Something")
  {
	// auto-bind node
	return true;
}

// otherwise do not auto-bind the node
return false;
</code></pre>
</blockquote>
<p dir="auto">I am having a problem with this script.  I have copied and pasted it into a template on the Automatic Apply Rules section.  I changed "Something" to the name of one of my containers, and when I ran a poll Configuration (full) on one of my nodes that is in that container, the node did not get added to the template.</p>
<p dir="auto">I noticed that there is an uneven number of "}" and put them in various places with no luck.  My guess is I am having a simple syntax issue.  Should this script work exactly as posted?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/post/20495</link><guid isPermaLink="true">https://forum.netxms.org/post/20495</guid><dc:creator><![CDATA[aarb00]]></dc:creator><pubDate>Thu, 28 Jul 2016 14:57:48 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Mon, 11 May 2015 11:26:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/16815">Suggestion - Apply template to containers</a>:</p>
<blockquote>
<p dir="auto">As I said before, use auto-bind script on the template.</p>
<p dir="auto">What you want is already possible, just use the script that I gave you a few posts ago.</p>
<p dir="auto">It will bind the nodes under the folder to the template during a configuration poll.</p>
</blockquote>
<p dir="auto">I didn't want to use scripts because then an operator would have troubles when trying to change something... And I imagine the changes needed to turn possible what I asked for are not very complicated, but no problem! <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
Thank you very much for your help!</p>
]]></description><link>https://forum.netxms.org/post/16825</link><guid isPermaLink="true">https://forum.netxms.org/post/16825</guid><dc:creator><![CDATA[jhuliagraziella]]></dc:creator><pubDate>Mon, 11 May 2015 11:26:05 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Sat, 09 May 2015 08:13:04 GMT]]></title><description><![CDATA[<p dir="auto">As I said before, use auto-bind script on the template.</p>
<p dir="auto">What you want is already possible, just use the script that I gave you a few posts ago.</p>
<p dir="auto">It will bind the nodes under the folder to the template during a configuration poll.</p>
]]></description><link>https://forum.netxms.org/post/16815</link><guid isPermaLink="true">https://forum.netxms.org/post/16815</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Sat, 09 May 2015 08:13:04 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Fri, 08 May 2015 18:17:44 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, sorry, sorry. I mixed my posts and am embarassed now.  :-[</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jhuliagraziella" aria-label="Profile: jhuliagraziella">@<bdi>jhuliagraziella</bdi></a> said in <a href="/post/16796">Suggestion - Apply template to containers</a>:</p>
<blockquote>
<p dir="auto">Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I delete something? (I'm talking about deletion by clicking with mouse's right button and then selecting delete, because that's how the operators will probably do it).<br />
If this is possible almost ALL my problems can be resolved by configuring this!  ;D</p>
</blockquote>
<p dir="auto">Correction:<br />
Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I try to apply a template? (I'm talking about applying a template by clicking with mouse's right button and then selecting apply and selecting the nodes I want to apply, because that's how the operators will probably do it).<br />
If this is possible almost ALL my problems can be resolved by configuring this!  ;D</p>
<p dir="auto">I organized my node in containers to make it easier to see, but when applying templates this way of organizing really slows my job, because I have to open every container and select just the nodes I want and that way mistakes happen easily: I gotta be careful not to select nodes that shouldn't have the template applied and if I accidentaly select something that isn't a node (like a container) I get the following error:</p>
<p dir="auto">Cannot apply data collection template: Invalid object ID<br />
Invalid object ID</p>
<p dir="auto">What I wanted was: if i tried to apply a template to a container, all container's children nodes that are "aplliable" would be.</p>
]]></description><link>https://forum.netxms.org/post/16811</link><guid isPermaLink="true">https://forum.netxms.org/post/16811</guid><dc:creator><![CDATA[jhuliagraziella]]></dc:creator><pubDate>Fri, 08 May 2015 18:17:44 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Fri, 08 May 2015 10:19:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">how delete is involved here? I thought that original question was about applying template. Do you need to apply template to all nodes in the system or only some of them?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/16798</link><guid isPermaLink="true">https://forum.netxms.org/post/16798</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 08 May 2015 10:19:31 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 07 May 2015 18:06:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/16794">Suggestion - Apply template to containers</a>:</p>
<blockquote>
<p dir="auto">This is already entirely possible.</p>
<p dir="auto">Simply use auto-bind scripts...<br />
Here is an example:</p>
<pre><code>parents = GetNodeParents($node);

foreach(p : parents)
{
  // if the node has a parent with this name
  if (p-&gt;name == "Something")
  {
	// auto-bind node
	return true;
}

// otherwise do not auto-bind the node
return false;
</code></pre>
</blockquote>
<p dir="auto">Feeling like a newbie here, but how exactly do I configure to execute this type of script everytime I delete something? (I'm talking about deletion by clicking with mouse's right button and then selecting delete, because that's how the operators will probably do it).<br />
If this is possible almost ALL my problems can be resolved by configuring this!  ;D</p>
]]></description><link>https://forum.netxms.org/post/16796</link><guid isPermaLink="true">https://forum.netxms.org/post/16796</guid><dc:creator><![CDATA[jhuliagraziella]]></dc:creator><pubDate>Thu, 07 May 2015 18:06:47 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Thu, 28 Jul 2016 16:03:40 GMT]]></title><description><![CDATA[<p dir="auto">This is already entirely possible.</p>
<p dir="auto">Simply use auto-bind scripts...<br />
Here is an example:</p>
<pre><code>parents = GetNodeParents($node);

foreach(p : parents) {
  // if the node has a parent with this name
  if (p-&gt;name == "Something") {
    // auto-bind node
    return true;
  }
}

// otherwise do not auto-bind the node
return false;
</code></pre>
]]></description><link>https://forum.netxms.org/post/16794</link><guid isPermaLink="true">https://forum.netxms.org/post/16794</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Thu, 28 Jul 2016 16:03:40 GMT</pubDate></item><item><title><![CDATA[Reply to Suggestion - Apply template to containers on Wed, 06 May 2015 17:58:34 GMT]]></title><description><![CDATA[<p dir="auto">That would be great, Jhuliagraziella! I support your idea and would love to see some feature like that!</p>
<p dir="auto">May the force be with you!</p>
]]></description><link>https://forum.netxms.org/post/16764</link><guid isPermaLink="true">https://forum.netxms.org/post/16764</guid><dc:creator><![CDATA[bikeprata]]></dc:creator><pubDate>Wed, 06 May 2015 17:58:34 GMT</pubDate></item></channel></rss>