<?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[use dynamic IP from SNMPget to PING by subagent icmp.ping]]></title><description><![CDATA[<p dir="auto">I have the following situation:<br />
some firewalls (call it GATEWAY1) with dynamic WAN-IP addresses. There I have to ping the default gateway of the WAN interface from the NetXMS server and the result should be shown on the node GATEWAY1.</p>
<p dir="auto">I see two possibilities but can't find a working solution:<br />
1.<br />
On GATEWAY1 a DCI: Origin = Internal, Parameter = Dummy, Proxy-node = NetXMS-server. Than in transformation script SNMPGetValue (is functional) and a call of a subagnet icmp.ping. But I could't find a possibility to call a subagent from the script.<br />
2.<br />
put the SNMPGetValue in a script in the script library<br />
On GATEWAY1 a DCI: Origin = NetXMS Agent, Parameter = something like 'icmp.ping(script:getip)', no proxy node</p>
<p dir="auto">Does anybody have a hint or better a solution? I hope I described the situation accurate</p>
]]></description><link>https://forum.netxms.org/topic/2981/use-dynamic-ip-from-snmpget-to-ping-by-subagent-icmp.ping</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 19:40:55 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2981.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Mar 2014 20:13:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 14:20:29 GMT]]></title><description><![CDATA[<p dir="auto">now the penny has dropped <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="😉" /> thanks!</p>
]]></description><link>https://forum.netxms.org/post/13113</link><guid isPermaLink="true">https://forum.netxms.org/post/13113</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 06 Mar 2014 14:20:29 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 12:10:09 GMT]]></title><description><![CDATA[<p dir="auto">. is string concatenation operation in NXSL. NXSL does not do macro expansion within strings, so you have to do concatenation. Don't be confused by $ sign - it is valid character in identifiers and has not any special meaning. It's just a naming convention to start names of built-in variables with $. You can name your variable a$ for example.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13112</link><guid isPermaLink="true">https://forum.netxms.org/post/13112</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 06 Mar 2014 12:10:09 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 09:58:45 GMT]]></title><description><![CDATA[<p dir="auto">Thanks. I saw that in the documentation. But you gave me this:<br />
Icmp.Ping(" . $1 . ")</p>
<p dir="auto">I don't understand " . $1 . ".<br />
'$1' is the result of the SNMPget, thats clear, but why these points?<br />
I had expected something like Icmp.Ping("$1")</p>
]]></description><link>https://forum.netxms.org/post/13109</link><guid isPermaLink="true">https://forum.netxms.org/post/13109</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 06 Mar 2014 09:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 09:53:54 GMT]]></title><description><![CDATA[<p dir="auto">Timeout and packet size are optional arguments and can be omitted. There is word "optional" deep in parameter description <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="🙂" /> All following forms are valid:</p>
<p dir="auto">Icmp.Ping(10.10.10.1)<br />
Icmp.Ping(10.10.10.1,3000)<br />
Icmp.Ping(10.10.10.1,2000,120)<br />
Icmp.Ping(10.10.10.1,,140)</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13108</link><guid isPermaLink="true">https://forum.netxms.org/post/13108</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 06 Mar 2014 09:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 09:41:59 GMT]]></title><description><![CDATA[<p dir="auto">sorry last post was too early <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 />
I changed the Data Type of the DCI to integer and now it's ok. I thought the Data Type must be the type of the SNMP value. But it looks like Data Type is the type of the DCI-result after the transformation script.<br />
So only the question about the icmp.ping syntax is open.</p>
]]></description><link>https://forum.netxms.org/post/13107</link><guid isPermaLink="true">https://forum.netxms.org/post/13107</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 06 Mar 2014 09:41:59 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 09:33:55 GMT]]></title><description><![CDATA[<p dir="auto">another 'problem' is: now the result of the DCI is the latency of the ping (=ok) but it's a string, not an integer. Maybe because the SNMP Data Type is string (it's an IP address) but the result of the transformation script should be an integer.</p>
]]></description><link>https://forum.netxms.org/post/13106</link><guid isPermaLink="true">https://forum.netxms.org/post/13106</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 06 Mar 2014 09:33:55 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Thu, 06 Mar 2014 08:49:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor</p>
<p dir="auto">Many thanks for the very fast solution. It works</p>
<p dir="auto">The following line is the solution:<br />
return AgentReadParameter(server, "Icmp.Ping(" . $1 . ")"); [I didn't know that]</p>
<p dir="auto">But can you explain me the syntax you used 'icmp.ping(" . $1 . ")?<br />
From SubAgent documentation I have this syntax 'Icmp.Ping(target,*timeout*,*psize*)'</p>
<p dir="auto">thanks a lot!</p>
<p dir="auto">Dani</p>
]]></description><link>https://forum.netxms.org/post/13105</link><guid isPermaLink="true">https://forum.netxms.org/post/13105</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Thu, 06 Mar 2014 08:49:51 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Wed, 05 Mar 2014 21:17:36 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, I misunderstood the situation. Then you can use the following DCI:</p>
<p dir="auto">Origin = SNMP, Parameter = <em>OID you are using to get IP address</em></p>
<p dir="auto">with the following transformation script:</p>
<pre><code>server = FindNodeObject($node, "netxms-server-name");
return AgentReadParameter(server, "Icmp.Ping(" . $1 . ")");
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13095</link><guid isPermaLink="true">https://forum.netxms.org/post/13095</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 05 Mar 2014 21:17:36 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Wed, 05 Mar 2014 20:41:29 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor</p>
<p dir="auto">But in your suggestion, I have first get 'ip' (as you called it in your post) from a SNMPGetValue on node GATEWAY1. Can I use a script in the 'parameter' field of the DCI for this?</p>
<p dir="auto">thanks<br />
Dani</p>
]]></description><link>https://forum.netxms.org/post/13090</link><guid isPermaLink="true">https://forum.netxms.org/post/13090</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 05 Mar 2014 20:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Wed, 05 Mar 2014 20:28:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Solution #1 seems correct. You can get value from remote agent with <a href="http://%22http://wiki.netxms.org/wiki/NXSL:AgentReadParameter%22" rel="nofollow ugc">AgentReadParameter</a> function. However, easier would be to use proxy node directly:</p>
<p dir="auto">On GATEWAY1 a DCI: Origin = Agent, Parameter = Icmp.Ping(ip), Proxy-node = NetXMS-server</p>
<p dir="auto">No transformation script needed in this case.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13088</link><guid isPermaLink="true">https://forum.netxms.org/post/13088</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 05 Mar 2014 20:28:32 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Wed, 05 Mar 2014 20:26:09 GMT]]></title><description><![CDATA[<p dir="auto">yes but its not the WAN IP address (which I could get from resolved DDNS name), it's the default gateway address of the WAN subnet. I can get the default gateway IP address from the local routing table by SNMP, thats not the problem. But than I have to 'ping' this IP from the NetXMS server.</p>
]]></description><link>https://forum.netxms.org/post/13087</link><guid isPermaLink="true">https://forum.netxms.org/post/13087</guid><dc:creator><![CDATA[user54119]]></dc:creator><pubDate>Wed, 05 Mar 2014 20:26:09 GMT</pubDate></item><item><title><![CDATA[Reply to use dynamic IP from SNMPget to PING by subagent icmp.ping on Wed, 05 Mar 2014 20:19:14 GMT]]></title><description><![CDATA[<p dir="auto">May be you would try to use ddns systems in combination with server-side script to resolve current IP?</p>
]]></description><link>https://forum.netxms.org/post/13085</link><guid isPermaLink="true">https://forum.netxms.org/post/13085</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Wed, 05 Mar 2014 20:19:14 GMT</pubDate></item></channel></rss>