<?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[NXSL node down status]]></title><description><![CDATA[<p dir="auto">Im using a working "hack" to use dynamic proxy via Dummy DCI with TransformationScript to run a custom bashscript that do some checks.</p>
<p dir="auto">In the script i check if proxynode dont have any critical status (&gt;=4) because i couldnt find a way to check if a node is down with NXSL.<br />
This will work as long proxynode does not have any other alarms with Critical that is not "Node Down".<br />
But if the proxynode have a Critical alarm that is not "Node Down" it will be detected as proxynode is down...</p>
<p dir="auto">Script is:</p>
<pre><code>sub main() {
  myName = $node-&gt;name;
  // Find my proxy from myName="aaa-001-pc01"
  $node-&gt;name ~= "^([a-z0-9]+\-)";
  // Turn it into "aaa-proxynode"
  myProxy = $1."proxynode";

  // Check if myProxy exists
  nodeObj = FindNodeObject(null, myProxy);
  if(nodeObj == null) {
      return "ERR: Node ".myProxy." not found.";
  }

  // Check if myProxy is up
  checkPROXY = GetDCIValue(nodeObj, FindDCIByDescription(nodeObj, "Status"));
  if (checkPROXY &gt;= 4) {
      return "OK but proxy unreachable";
  }

  val = -1;
  agentParam = "EXEC(proxyscript.sh ".myName.")";
  val = AgentReadParameter(nodeObj, agentParam);
  if(val == null) {
      return "ERR: Param ".agentParam." could not be retreived.";
  }

  return val;
}
</code></pre>
]]></description><link>https://forum.netxms.org/topic/3452/nxsl-node-down-status</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:18:29 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3452.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Nov 2014 08:00:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NXSL node down status on Wed, 05 Nov 2014 14:27:25 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for quick reply Victor.</p>
<p dir="auto">I see this option comes with 1.2.12, but we are still at 1.2.9.<br />
Yet another reason to do the upgrade  ::)..</p>
]]></description><link>https://forum.netxms.org/post/15252</link><guid isPermaLink="true">https://forum.netxms.org/post/15252</guid><dc:creator><![CDATA[Borgso]]></dc:creator><pubDate>Wed, 05 Nov 2014 14:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to NXSL node down status on Wed, 05 Nov 2014 09:23:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you can use <strong>runtimeFlags</strong> property of node object to get node down state. If UNREACHABLE (0x0004) flag is set, then NetXMS considers this node as down. You can check it as follows:</p>
<pre><code>if (nodeObj-&gt;runtimeFlags &amp; 0x0004) {
      return "OK but proxy unreachable";
  }
</code></pre>
<p dir="auto">All runtime flags described here: <a href="http://wiki.netxms.org/wiki/NXSL:Node:runtimeFlags" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL:Node:runtimeFlags</a>.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/15234</link><guid isPermaLink="true">https://forum.netxms.org/post/15234</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 05 Nov 2014 09:23:40 GMT</pubDate></item></channel></rss>