<?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[Object Filter in Layer3-Maps]]></title><description><![CDATA[<p dir="auto">I have a Layer3 map where I only want nodes from container 'London'.</p>
<p dir="auto">I tried with the following filter script but got always all nodes instead of only those in container 'London':</p>
<pre><code>parents = GetNodeParents((FindObject($1));
if (parents == null) return false;
foreach(p : parents)
{
   if (p-&gt;type == 5 &amp;&amp; p-&gt;name == "London") return true;
}
return false;
</code></pre>
<ol>
<li>Do I have a typo or an error in reasoning?</li>
<li>What is the input of the filtering script? An object? An ID? (didn't found it in documentation)</li>
<li>When you temporarily disable the filter, the filtering script will be deleted (bug or feature?)</li>
</ol>
<p dir="auto">Thanks for any input!</p>
]]></description><link>https://forum.netxms.org/topic/3867/object-filter-in-layer3-maps</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:19:59 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3867.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Jul 2015 14:31:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Thu, 09 Jul 2015 11:55:12 GMT]]></title><description><![CDATA[<p dir="auto">All my subnets has names like '10.1.17.0/24 (SiteA)' and all Containers are named like 'SiteA'. So I can filter like this:</p>
<pre><code>// only Subnets with 'SiteA' oder 'SiteB' in name
if (($object-&gt;type == 1) &amp;&amp; (($object-&gt;name ~= ".*(SiteA.*)") || ($object-&gt;name ~= ".*(SiteB.*)")))
   return true;
</code></pre>
<p dir="auto">Now the filtered map looks ok! But...</p>
<p dir="auto">...only one new problem. Cluster nodes:<br />
I tried to make an extention of the filtering script to handle clusters. But I found with a test script that cluster nodes has no node parents.</p>
<pre><code>parents = GetObjectParents($object);
foreach(p : parents)
   println("Type: " . p-&gt;type . " Name: " . p-&gt;name);
</code></pre>
<p dir="auto">Is this by design? With 'GetObjectParents' function I get neither the cluster-object nor the container as parent object. So all clusters nodes are missing on filtered maps.</p>
]]></description><link>https://forum.netxms.org/post/17290</link><guid isPermaLink="true">https://forum.netxms.org/post/17290</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 09 Jul 2015 11:55:12 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 19:55:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">it could be like this:</p>
<pre><code>if ($object-&gt;type == 1)
   return true;  // allow all subnets

parents = GetObjectParents($object);
//if (parents == null) return false;
foreach(p : parents)
{
   if ((p-&gt;type == 5) &amp;&amp; (p-&gt;name == "containerA" || p-&gt;name == "ContainerB")) return true;
}
return false;
</code></pre>
<p dir="auto">You can also add additional contraints on subnet names as usual using $object-&gt;name.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/17283</link><guid isPermaLink="true">https://forum.netxms.org/post/17283</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 19:55:03 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 19:51:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor</p>
<p dir="auto">When I add the subnets to the containers, I got the connectors in Layer3 map. But that's not very elegant. The other solution seems to be better.<br />
How can I change my filter to allow the necessary subnet objects?</p>
<p dir="auto">My current filter script is this:</p>
<pre><code>parents = GetObjectParents($object);
//if (parents == null) return false;
foreach(p : parents)
{
   if ((p-&gt;type == 5) &amp;&amp; (p-&gt;name == "containerA" || p-&gt;name == "ContainerB")) return true;
}
return false;
</code></pre>
]]></description><link>https://forum.netxms.org/post/17282</link><guid isPermaLink="true">https://forum.netxms.org/post/17282</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 19:51:35 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 17:14:43 GMT]]></title><description><![CDATA[<p dir="auto">I probably understand it - nodes on L3 map re connected via subnet objects, not directly - and you filtered out subnet objects. You should change your filter to allow subnets or add relevant subnet objects to your container.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/17277</link><guid isPermaLink="true">https://forum.netxms.org/post/17277</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 17:14:43 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 14:47:24 GMT]]></title><description><![CDATA[<p dir="auto">Default connection options are on default color. I also tried with manually set to black. VPN-connectors (dotted) and the 'normal' connectors always have the same color. The last printscreen was without automatic layout. Here is one with automatic layout. Here I can't see any arrangement. Everything is mixed up.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002336-map2.png" alt="map2.png" class="img-markdown  img-fluid" width="1549" height="688" /></p>
]]></description><link>https://forum.netxms.org/post/17276</link><guid isPermaLink="true">https://forum.netxms.org/post/17276</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 14:47:24 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 14:28:18 GMT]]></title><description><![CDATA[<p dir="auto">Did you check connector color in map properties? By objects' locations it seems that they are connected but connectors are invisible.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/17275</link><guid isPermaLink="true">https://forum.netxms.org/post/17275</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 14:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 14:03:08 GMT]]></title><description><![CDATA[<p dir="auto">ok, thanks for the explanation.</p>
<p dir="auto">But do you have any idea why all connectors are missing on the filtered layer3 map?</p>
]]></description><link>https://forum.netxms.org/post/17273</link><guid isPermaLink="true">https://forum.netxms.org/post/17273</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 14:03:08 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 14:00:43 GMT]]></title><description><![CDATA[<p dir="auto">currently all scripts are handled equally - so it doesn't matter if script is a network map filter or DCI transformation script for example. Reason is the same - imagine you have access only to network map object - if script do not have access checks you'll be able to access data for nodes you don't have access to. I thinking for some time already about more sophisticated access control within scripts, but don't have better solution yet.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/17272</link><guid isPermaLink="true">https://forum.netxms.org/post/17272</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 14:00:43 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 13:55:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor</p>
<p dir="auto">I tried manually and automatic layout. At the moment it's automatic layout. On this map are routers, switches and end nodes.</p>
<p dir="auto">Can you please also explain for short the trusted nodes in this situation (not in general).</p>
<p dir="auto">thanks<br />
Dani</p>
]]></description><link>https://forum.netxms.org/post/17271</link><guid isPermaLink="true">https://forum.netxms.org/post/17271</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 13:55:27 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 13:46:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">links are not affected by map filter. Did you layout nodes by hand? If not, it seems as if links are there but just invisible. Just in case - check link color in map properties.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/17270</link><guid isPermaLink="true">https://forum.netxms.org/post/17270</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 13:46:44 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 10:54:46 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Tomas for your help.</p>
<p dir="auto">Now I hope Victor will see this thread soon.</p>
<p dir="auto">Dani</p>
]]></description><link>https://forum.netxms.org/post/17263</link><guid isPermaLink="true">https://forum.netxms.org/post/17263</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 10:54:46 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 10:33:49 GMT]]></title><description><![CDATA[<p dir="auto">As I mentioned, for me it works fine with filtering scripts, but I do not show end-nodes on my map.</p>
<p dir="auto">Victor will have to shed more light on both the issues <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="🙂" /></p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002334-map-with-filter.PNG" alt="map-with-filter.PNG" class="img-markdown  img-fluid" width="1144" height="676" /></p>
]]></description><link>https://forum.netxms.org/post/17262</link><guid isPermaLink="true">https://forum.netxms.org/post/17262</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Wed, 08 Jul 2015 10:33:49 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 10:13:25 GMT]]></title><description><![CDATA[<p dir="auto">Yes maybe Victor can give an answer.</p>
<p dir="auto">I only see one VPN connector but no other 'normal' connectors. See the attached printscreen. Strange. All nodes on the left side should be connected to one of the VPN endpoints and the two on the right side with the other. In the map without the filtering script all connectors are there</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002332-map.png" alt="map.png" class="img-markdown  img-fluid" width="996" height="592" /></p>
]]></description><link>https://forum.netxms.org/post/17261</link><guid isPermaLink="true">https://forum.netxms.org/post/17261</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 08 Jul 2015 10:13:25 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Wed, 08 Jul 2015 08:20:14 GMT]]></title><description><![CDATA[<p dir="auto">I do not know why script security is being applied here, maybe Victor can tell us. <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="🙂" /></p>
<p dir="auto">You are not getting connectors as in the links connecting the nodes on the map?<br />
I get those when using the filtering script.</p>
]]></description><link>https://forum.netxms.org/post/17260</link><guid isPermaLink="true">https://forum.netxms.org/post/17260</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Wed, 08 Jul 2015 08:20:14 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Tue, 07 Jul 2015 17:53:02 GMT]]></title><description><![CDATA[<p dir="auto">when I set sever variable 'CheckTrustedNodes' to 0 (and restart the NetXMS server of course), I get the nodes on the map. But I get no connectors on the map beside VPN-connectors. Why? Connectors are no NetObj objects.... so no filtering on that. Is this the same on your installation?</p>
<p dir="auto">I don't understand exactly why 'CheckTrustedNodes' has an influence here.<br />
But when I set all nodes in a container to the Trusted Nodes of this container, this nodes appear on the map.</p>
<p dir="auto">Thanks for the hint with the 'direct' parents.</p>
]]></description><link>https://forum.netxms.org/post/17248</link><guid isPermaLink="true">https://forum.netxms.org/post/17248</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Tue, 07 Jul 2015 17:53:02 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Mon, 06 Jul 2015 16:57:23 GMT]]></title><description><![CDATA[<p dir="auto">This works for me:</p>
<pre><code>parents = GetObjectParents($object);

foreach(p : parents)
{
   if (p-&gt;type == 5 &amp;&amp; p-&gt;name == "Something") return true;
}
return false;
</code></pre>
<p dir="auto">Two things to note:</p>
<ol>
<li>it only takes "direct" parents of the node, its not upwards recursive, so doesnt take parents of the node's parents into account</li>
<li>CheckTrustedNodes (or equivalent security) will need to be correctly set</li>
</ol>
<p dir="auto">You can run the script directly on an object using "Execute server script" to check whats going on.<br />
I suggest adding this into the foreach loop to make debug easier:</p>
<pre><code>println("Type: " . p-&gt;type . " Name: " . p-&gt;name);
</code></pre>
]]></description><link>https://forum.netxms.org/post/17244</link><guid isPermaLink="true">https://forum.netxms.org/post/17244</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Mon, 06 Jul 2015 16:57:23 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Mon, 06 Jul 2015 16:37:11 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your fast reply Tomas.</p>
<p dir="auto">using $object instead of $1 -&gt; Error 17 (Argument is not of string type and cannot be converted to string. So I changed to</p>
<pre><code>parents = GetNodeParents($object);
</code></pre>
<p dir="auto">-&gt; Error 21 (Bad or incompatible object class), it's NetObj not Node class. So I tried this (most logical for me):</p>
<pre><code>parents = GetObjectParents($object);
</code></pre>
<p dir="auto">No error, but now the map is empty <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":-(" alt="😞" /></p>
<p dir="auto">I registered a ticket for the disable-bug</p>
<p dir="auto">thanks<br />
Dani</p>
]]></description><link>https://forum.netxms.org/post/17243</link><guid isPermaLink="true">https://forum.netxms.org/post/17243</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Mon, 06 Jul 2015 16:37:11 GMT</pubDate></item><item><title><![CDATA[Reply to Object Filter in Layer3-Maps on Mon, 06 Jul 2015 16:07:01 GMT]]></title><description><![CDATA[<ol>
<li>use $object variable, not $1</li>
<li>yes, its an "NetObj" class object</li>
<li>sounds like a bug, log it in bug-tracker <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="🙂" /></li>
</ol>
]]></description><link>https://forum.netxms.org/post/17242</link><guid isPermaLink="true">https://forum.netxms.org/post/17242</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Mon, 06 Jul 2015 16:07:01 GMT</pubDate></item></channel></rss>