<?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[GetNodeInterfaces - parameters [SOLVED]]]></title><description><![CDATA[<p dir="auto">In the <a href="http://wiki.netxms.org/wiki/NXSL:GetNodeInterfaces" rel="nofollow ugc">GetNodeInterfaces</a> example there are used two parameters - name and id.</p>
<p dir="auto">My question is - can other parameters from <a href="http://wiki.netxms.org/wiki/NXSL:Interface" rel="nofollow ugc">Interfaces</a> be used the same way or it is not possible at all ?</p>
<p dir="auto">I'm trying to get a list of peers with "i-&gt;peerInterface", no results with GetNodeIntefaces or GetObectChildren too - script fails at this point with "invalid operation on object".</p>
<p dir="auto">Any help?</p>
]]></description><link>https://forum.netxms.org/topic/2872/getnodeinterfaces-parameters-solved</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:28:11 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2872.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Jan 2014 14:35:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetNodeInterfaces - parameters [SOLVED] on Fri, 24 Jan 2014 14:47:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sperlm" aria-label="Profile: sperlm">@<bdi>sperlm</bdi></a> said in <a href="/post/12553">GetNodeInterfaces - parameters [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">p.s. could I get my old topic <a href="https://www.netxms.org/forum/configuration/dependency-script-based-on-infrastructure/" rel="nofollow ugc">Dependency script based on infrastructure</a> unlocked to post what I came up with to share with others ?</p>
</blockquote>
<p dir="auto">unlocked.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/12554</link><guid isPermaLink="true">https://forum.netxms.org/post/12554</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 24 Jan 2014 14:47:44 GMT</pubDate></item><item><title><![CDATA[Reply to GetNodeInterfaces - parameters [SOLVED] on Fri, 24 Jan 2014 13:02:06 GMT]]></title><description><![CDATA[<p dir="auto">Thanks! Work like a charm  ;D</p>
<p dir="auto">p.s. could I get my old topic <a href="https://www.netxms.org/forum/configuration/dependency-script-based-on-infrastructure/" rel="nofollow ugc">Dependency script based on infrastructure</a> unlocked to post what I came up with to share with others ?</p>
]]></description><link>https://forum.netxms.org/post/12553</link><guid isPermaLink="true">https://forum.netxms.org/post/12553</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Fri, 24 Jan 2014 13:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to GetNodeInterfaces - parameters [SOLVED] on Fri, 24 Jan 2014 11:07:37 GMT]]></title><description><![CDATA[<p dir="auto">Your problem here is that i-&gt;peerNode is an object, not a string, so you should use something like i-&gt;peerNode-&gt;name.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/12551</link><guid isPermaLink="true">https://forum.netxms.org/post/12551</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 24 Jan 2014 11:07:37 GMT</pubDate></item><item><title><![CDATA[Reply to GetNodeInterfaces - parameters [SOLVED] on Fri, 24 Jan 2014 10:21:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">   there is no description for GetInterfaceName/Object functions so I am constructing script with GetNodeInterfaces or GetObjectChildren (with the same results).</p>
<p dir="auto">The goal is to list peer nodes of subjected node.<br />
The following macro works fine, returning a list of all ports and then another list with ports which have any peer connection listed.</p>
<pre><code>ports = "PORTs:\n";
peers = "PEERs:\n";
interfaces = GetObjectChildren($node); (or GetNodeInterfaces function)
foreach (i : interface)
{
	ports = ports."- name=".i-&gt;name.", id=".i-&gt;id."\n";
	if (i-&gt;peerNode != null)
	{
		peers = peers."- name=".i-&gt;name.", IP=".i-&gt;ipAddr.", peer=".i-&gt;peerNode."\n";
	}
}
return ports.peers;
</code></pre>
<p dir="auto">Whole macro works fine except the last statement which returns error message.<br />
After removing the "i-&gt;peerNode" part I get nice output in this form:</p>
<blockquote>
<p dir="auto">PORTs:<br />
* name='Vl1 id=5699'<br />
* name='Vl91 id=5700'<br />
* name='Fa0/1 id=5701'<br />
* name='Fa0/2 id=5702'<br />
...<br />
* name='Fa0/23 id=5723'<br />
* name='Fa0/24 id=5724'<br />
* name='Gi0/1 id=5725'<br />
* name='Gi0/2 id=5726'<br />
* name='Nu0 id=5727'<br />
PEERs:<br />
* name='Gi0/1' IP=0.0.0.0 peer='<br />
* name='Gi0/2' IP=0.0.0.0 peer='</p>
</blockquote>
<p dir="auto">Tried to use structure with GetInterfaceObject in the foreach loop...<br />
<em>iface = GetInterfaceObject(i,  $5];</em><br />
... to get iface-&gt;peerNode, but I get immediately "Function not found" on the line with GetInterfaceObject function.</p>
<p dir="auto">With regards,<br />
Milan Sperl</p>
]]></description><link>https://forum.netxms.org/post/12549</link><guid isPermaLink="true">https://forum.netxms.org/post/12549</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Fri, 24 Jan 2014 10:21:11 GMT</pubDate></item><item><title><![CDATA[Reply to GetNodeInterfaces - parameters [SOLVED] on Thu, 23 Jan 2014 20:55:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Can you explaint in more detail what you are trying to achieve or maybe post whole script? There are also example of using peerNode and peerInterface attributes: <a href="http://wiki.netxms.org/wiki/Script_Example:_Additional_Information_About_Connected_Node" rel="nofollow ugc">http://wiki.netxms.org/wiki/Script_Example:_Additional_Information_About_Connected_Node</a>.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/12540</link><guid isPermaLink="true">https://forum.netxms.org/post/12540</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 23 Jan 2014 20:55:56 GMT</pubDate></item></channel></rss>