<?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: Alarms by node]]></title><description><![CDATA[<p dir="auto">I need a little assistance on how to use nxsl to pull all alarms from a node.  Any help would be appreciated.</p>
]]></description><link>https://forum.netxms.org/topic/6743/nxsl-alarms-by-node</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:10:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6743.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Oct 2020 14:36:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NXSL: Alarms by node on Tue, 27 Oct 2020 16:10:19 GMT]]></title><description><![CDATA[<p dir="auto">Yes, you have to get node object first. Global variables $node and $object refer to current node. You can use function FindObject to get other objects. This function accepts either object ID or name. For example, if you want to print alarms for node named "netxms-server":</p>
<pre><code>node = FindObject("netxms-server");
for(a : node-&gt;alarms)
{
	println(a-&gt;message);
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/28763</link><guid isPermaLink="true">https://forum.netxms.org/post/28763</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 27 Oct 2020 16:10:19 GMT</pubDate></item><item><title><![CDATA[Reply to NXSL: Alarms by node on Mon, 26 Oct 2020 17:26:02 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, I wasn't very detailed with my question.  What I am trying to figure out if a script runs I can pull alarms from a node, but from any node I choose.  So in a script how would I say clear alarms from 192.168.1.1 and it would switch to that node and run the commands.  Do I need to use like GetObject or something like that?  I am not a coder (clearly) but my struggle is understanding how to be in the correct context/object to run class commands</p>
]]></description><link>https://forum.netxms.org/post/28759</link><guid isPermaLink="true">https://forum.netxms.org/post/28759</guid><dc:creator><![CDATA[mem16421]]></dc:creator><pubDate>Mon, 26 Oct 2020 17:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to NXSL: Alarms by node on Mon, 26 Oct 2020 16:42:30 GMT]]></title><description><![CDATA[<p dir="auto">Something like that:</p>
<pre><code>for(a : $object-&gt;alarms)
{
	println(a-&gt;message);
}
</code></pre>
<p dir="auto">List of alarms is an attribute of any object, not only node - it could be container, subnet, sensor... That's why I am using $object-&gt;alarms in the example, but if the object you are querying is a node, you can use $node-&gt;alarms</p>
<p dir="auto">Documentation it's here: <a href="https://www.netxms.org/documentation/nxsl-latest/#class-netobj" rel="nofollow ugc">https://www.netxms.org/documentation/nxsl-latest/#class-netobj</a></p>
]]></description><link>https://forum.netxms.org/post/28758</link><guid isPermaLink="true">https://forum.netxms.org/post/28758</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 26 Oct 2020 16:42:30 GMT</pubDate></item></channel></rss>