<?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[Alarm key SERVICE_DOWN_ => Function or operation argument is not an object]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I tried a NXSL script to display the content of all alarms.<br />
It works for MAC_ADDRESS_CHANGED_.* for example:</p>
<pre><code>	alarm = FindAlarmByKeyRegex("MAC_ADDRESS_CHANGED_.*");
	println alarm-&gt;message;

MAC address for interface unknown changed from XX:XX:XX:XX:XX:XX to XX:XX:XX:XX:XX:XX
*** FINISHED ***
</code></pre>
<p dir="auto">But it doesn't work for SERVICE_DOWN_?</p>
<pre><code>	alarm = FindAlarmByKeyRegex("SERVICE_DOWN_.*");
	println alarm-&gt;message;

Error 14 in line 64: Function or operation argument is not an object
</code></pre>
<p dir="auto">I must be doing it wrong...</p>
<p dir="auto">Can you help me?</p>
<p dir="auto">Thanks<br />
BB</p>
]]></description><link>https://forum.netxms.org/topic/7042/alarm-key-service_down_-function-or-operation-argument-is-not-an-object</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:26:03 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7042.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 May 2021 11:13:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Tue, 11 May 2021 07:36:13 GMT]]></title><description><![CDATA[<p dir="auto">oh!</p>
<p dir="auto">I've got it:</p>
<pre><code>		oldestAlarmTime = min(oldestAlarmTime, a-&gt;creationTime);
		println n-&gt;id . "\t" . n-&gt;name . "\t" . a-&gt;message . "\t" . strftime("%Y-%m-%d %H:%M", a-&gt;creationTime);
</code></pre>
<p dir="auto">Thanks to all.</p>
<p dir="auto">BB</p>
]]></description><link>https://forum.netxms.org/post/29978</link><guid isPermaLink="true">https://forum.netxms.org/post/29978</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Tue, 11 May 2021 07:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Tue, 11 May 2021 07:27:56 GMT]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">Thank you, this has inspired me a lot!</p>
<p dir="auto">Now I can display the id, name and message of each alarm.</p>
<pre><code>for (n : GetAllNodes())
{
	for(a : n-&gt;alarms)
	{
		println n-&gt;id . "\t" . n-&gt;name . "\t" . a-&gt;message;
	}
}
</code></pre>
<p dir="auto">But I don't know how to display the date ?</p>
<p dir="auto">Thanks for your help.<br />
BB</p>
]]></description><link>https://forum.netxms.org/post/29977</link><guid isPermaLink="true">https://forum.netxms.org/post/29977</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Tue, 11 May 2021 07:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Mon, 10 May 2021 16:03:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you can access all alarms via "Entire Network" or "Infrastructure Services" objects. FOr example, the following script will print all alarm messages:</p>
<pre><code>for(a : FindObject(1)-&gt;alarms)
{
	println a-&gt;message;
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/29975</link><guid isPermaLink="true">https://forum.netxms.org/post/29975</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 10 May 2021 16:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Mon, 10 May 2021 14:36:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm trying to get the logs as displayed in the "Alarm Browser" window.<br />
As I said, this may not be the right way to do it  :-[</p>
<p dir="auto">I have now gone another way, exporting the alarms when they appear using the "Event Processing Policy" and an associated "Action".<br />
But then I'll have to manage the acknowledgements myself ... etc...</p>
<p dir="auto">BB</p>
]]></description><link>https://forum.netxms.org/post/29973</link><guid isPermaLink="true">https://forum.netxms.org/post/29973</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Mon, 10 May 2021 14:36:44 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Mon, 10 May 2021 12:03:20 GMT]]></title><description><![CDATA[<p dir="auto">The script in your example returns only one alarm for each key. E.g. if you have several node with NODE_DOWN alarm, only one will be returned.</p>
<p dir="auto">Can you give some information on what you are trying to achieve as the final result?</p>
]]></description><link>https://forum.netxms.org/post/29967</link><guid isPermaLink="true">https://forum.netxms.org/post/29967</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 10 May 2021 12:03:20 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Fri, 07 May 2021 13:08:09 GMT]]></title><description><![CDATA[<p dir="auto">I am also in the 3.8.314 version  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--confused" style="height:1.4em;width:auto;vertical-align:middle" title=":-\" alt="😕" /></p>
]]></description><link>https://forum.netxms.org/post/29962</link><guid isPermaLink="true">https://forum.netxms.org/post/29962</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Fri, 07 May 2021 13:08:09 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Fri, 07 May 2021 12:45:16 GMT]]></title><description><![CDATA[<p dir="auto">Your script works without issue on my end.  I'm using 3.8.314.</p>
]]></description><link>https://forum.netxms.org/post/29961</link><guid isPermaLink="true">https://forum.netxms.org/post/29961</guid><dc:creator><![CDATA[Zebble]]></dc:creator><pubDate>Fri, 07 May 2021 12:45:16 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Fri, 07 May 2021 12:31:18 GMT]]></title><description><![CDATA[<p dir="auto">But, I think this is not the right way...</p>
<pre><code>a_key = %("NODE_DOWN_.*","SERVICE_DOWN_.*","IF_DOWN_.*","IF_UNEXP_UP_.*","BAD_NETMASK_.*","SCRIPT_ERR_.*","DCI_STATUS_.*","DC_THRESHOLD_.*","DCTTHR_.*","SYS_THREAD_HANG_.*","MAINTENANCE_MODE_.*","AGENT_UNREACHABLE_.*","SNMP_UNREACHABLE_.*","SYS_LDAP_SYNC_ERROR_.*","SYS_AGENT_LOG_PROBLEM_.*","SYS_AGENT_LOCAL_DATABASE_PROBLEM_.*","MAC_ADDRESS_CHANGED_.*","BAD_NETMASK_.*","ROUTING_LOOP_.*","SW_PKG_.*");

for (i = 0; i &lt; a_key-&gt;size; i++ )
{
	alarm = FindAlarmByKeyRegex(a_key[i]);
	if (alarm != NULL)
	{
		println  (alarm-&gt;key) . (alarm-&gt;message) . "\n";
	}
}


NODE_DOWN_0x000099C6Node down

SCRIPT_ERR_Template::Zone Proxy::108_Error in line 1: syntax error, unexpected $end, expecting ';'Script (Template::Zone Proxy::108) execution error: Error in line 1: syntax error, unexpected $end, expecting ';'

MAC_ADDRESS_CHANGED_0x0001EDB7_1MAC address for interface unknown changed from XX:XX:XX:XX:XX:XX to XX:XX:XX:XX:XX:XX


*** FINISHED ***

Result:
</code></pre>
<p dir="auto">I have a lot of errors and "alarm-&gt;message" does not return all the information.<br />
Do you know if it is possible to get about the same result in "Alarm Browser"?</p>
]]></description><link>https://forum.netxms.org/post/29960</link><guid isPermaLink="true">https://forum.netxms.org/post/29960</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Fri, 07 May 2021 12:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Fri, 07 May 2021 12:16:16 GMT]]></title><description><![CDATA[<p dir="auto">ok, thanks.</p>
<p dir="auto">Sorry for my inexperience with NXSL<br />
 :-[</p>
<p dir="auto">BB</p>
]]></description><link>https://forum.netxms.org/post/29959</link><guid isPermaLink="true">https://forum.netxms.org/post/29959</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Fri, 07 May 2021 12:16:16 GMT</pubDate></item><item><title><![CDATA[Reply to Alarm key SERVICE_DOWN_ => Function or operation argument is not an object on Fri, 07 May 2021 11:58:23 GMT]]></title><description><![CDATA[<p dir="auto">alarm = FindAlarmByKeyRegex("SERVICE_DOWN_.*");</p>
<p dir="auto">works for me, but only if there are alarms that have SERVICE_DOWN_.  If there aren't any, you'll get a "Function or operation argument is not an object" if you try to println alarm-&gt;message because alarm isn't an object.  Alarm would be set to NULL in this case, so best to check for this:</p>
<p dir="auto">if (alarm != NULL)<br />
  println alarm-&gt;message;</p>
]]></description><link>https://forum.netxms.org/post/29958</link><guid isPermaLink="true">https://forum.netxms.org/post/29958</guid><dc:creator><![CDATA[Zebble]]></dc:creator><pubDate>Fri, 07 May 2021 11:58:23 GMT</pubDate></item></channel></rss>