<?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[Отключение агентов для новых нод]]></title><description><![CDATA[<p dir="auto">У меня в сети не используются агенты.<br />
Можно ли добавить опцию для отключения агентов для всех новых нод?</p>
]]></description><link>https://forum.netxms.org/topic/3019/отключение-агентов-для-новых-нод</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:43:12 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3019.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Mar 2014 09:46:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Отключение агентов для новых нод on Wed, 26 Mar 2014 10:18:46 GMT]]></title><description><![CDATA[<p dir="auto">Спасибо!<br />
Все заработало.<br />
Скрипт:</p>
<pre><code>$node-&gt;enableAgent(false);
</code></pre>
]]></description><link>https://forum.netxms.org/post/13309</link><guid isPermaLink="true">https://forum.netxms.org/post/13309</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Wed, 26 Mar 2014 10:18:46 GMT</pubDate></item><item><title><![CDATA[Reply to Отключение агентов для новых нод on Wed, 26 Mar 2014 10:13:37 GMT]]></title><description><![CDATA[<p dir="auto">Если скрипт вызван из политики, то у него будут две переменных выставлены - $node и $event. Описания классов здесь: <a href="http://wiki.netxms.org/wiki/NXSL:Node" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL:Node</a> и <a href="http://wiki.netxms.org/wiki/NXSL:Event" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL:Event</a>.</p>
]]></description><link>https://forum.netxms.org/post/13307</link><guid isPermaLink="true">https://forum.netxms.org/post/13307</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 26 Mar 2014 10:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to Отключение агентов для новых нод on Wed, 26 Mar 2014 10:01:47 GMT]]></title><description><![CDATA[<p dir="auto">Столкнулся с проблемой передачи параметра в скрипт.</p>
<p dir="auto">Если в Actions Configuration:<br />
DisableAgentOnEvent - запускает скрипт без параметров. Действий не происходит.<br />
DisableAgentOnEvent(%I) - Не найден скрипт</p>
<pre><code>Node added
[26-Mar-2014 11:22:15.913] [DEBUG] *actions* Executing action 1 (DisableAgentNodeAdded) of type NXSL SCRIPT
[26-Mar-2014 11:22:15.913] [DEBUG] *actions* Executing NXSL script "DisableAgentOnEvent(8665)"
[26-Mar-2014 11:22:15.913] [DEBUG] ExecuteActionScript(): Cannot find script DisableAgentOnEvent(8665)
</code></pre>
<p dir="auto">Из консоли тоже ошибка:</p>
<pre><code>$ nxadm -c "exec DisableAgentOnEvent(8647)"
ERROR: Script "DisableAgentOnEvent(8647)" not found
</code></pre>
<p dir="auto">DisableAgentOnEvent %I - Не найден скрипт</p>
<pre><code>[26-Mar-2014 11:17:15.361] [DEBUG] *actions* Executing action 1 (DisableAgentNodeAdded) of type NXSL SCRIPT
[26-Mar-2014 11:17:15.361] [DEBUG] *actions* Executing NXSL script "DisableAgentOnEvent 8658"
[26-Mar-2014 11:17:15.361] [DEBUG] ExecuteActionScript(): Cannot find script DisableAgentOnEvent 8658
</code></pre>
<p dir="auto">Из консоли - работает</p>
<pre><code>nxadm -c "exec DisableAgentOnEvent 8647"
INFO: Script finished with rc=0
</code></pre>
<p dir="auto">Как правильно привязать скрипт к event?</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001685-EventProcessing.PNG" alt="EventProcessing.PNG" class="img-markdown  img-fluid" width="1019" height="144" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001687-Actions_Configuration.PNG" alt="Actions Configuration.PNG" class="img-markdown  img-fluid" width="694" height="524" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001689-Script.PNG" alt="Script.PNG" class="img-markdown  img-fluid" width="716" height="178" /></p>
]]></description><link>https://forum.netxms.org/post/13305</link><guid isPermaLink="true">https://forum.netxms.org/post/13305</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Wed, 26 Mar 2014 10:01:47 GMT</pubDate></item><item><title><![CDATA[Reply to Отключение агентов для новых нод on Tue, 25 Mar 2014 22:56:33 GMT]]></title><description><![CDATA[<p dir="auto">С добавлением метода enableAgent можно повесить скрипт на SYS_NODE_ADDED и отключать агентов с его помощью.</p>
]]></description><link>https://forum.netxms.org/post/13301</link><guid isPermaLink="true">https://forum.netxms.org/post/13301</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 25 Mar 2014 22:56:33 GMT</pubDate></item></channel></rss>