<?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[Передача параметров из Action в скрипт]]></title><description><![CDATA[<p dir="auto">Возможно ли передать параметры из Event (время, ip-адрес и т.п.) через Action во внешний скрипт или записать в файл?</p>
]]></description><link>https://forum.netxms.org/topic/158/передача-параметров-из-action-в-скрипт</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 21:41:49 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/158.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Dec 2007 11:43:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 12:57:00 GMT]]></title><description><![CDATA[<p dir="auto">вообще то  предполагал передачу всего уведомления скрипту</p>
]]></description><link>https://forum.netxms.org/post/775</link><guid isPermaLink="true">https://forum.netxms.org/post/775</guid><dc:creator><![CDATA[weec]]></dc:creator><pubDate>Mon, 10 Dec 2007 12:57:00 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 12:11:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/weec" aria-label="Profile: weec">@<bdi>weec</bdi></a> said in <a href="/post/771">Передача параметров из Action в скрипт</a>:</p>
<blockquote>
<p dir="auto">похоже я неправильно понял вопрос</p>
</blockquote>
<p dir="auto">почему? Речь шла именно о передаче данных о событии во внешний скрипт.</p>
]]></description><link>https://forum.netxms.org/post/772</link><guid isPermaLink="true">https://forum.netxms.org/post/772</guid><dc:creator><![CDATA[isherim]]></dc:creator><pubDate>Mon, 10 Dec 2007 12:11:55 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 11:56:57 GMT]]></title><description><![CDATA[<p dir="auto">похоже я неправильно понял вопрос</p>
]]></description><link>https://forum.netxms.org/post/771</link><guid isPermaLink="true">https://forum.netxms.org/post/771</guid><dc:creator><![CDATA[weec]]></dc:creator><pubDate>Mon, 10 Dec 2007 11:56:57 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 11:56:12 GMT]]></title><description><![CDATA[<p dir="auto">Ан нет... С $1 $2 $3 все передано.<br />
Спасибо!</p>
]]></description><link>https://forum.netxms.org/post/770</link><guid isPermaLink="true">https://forum.netxms.org/post/770</guid><dc:creator><![CDATA[isherim]]></dc:creator><pubDate>Mon, 10 Dec 2007 11:56:12 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 11:54:15 GMT]]></title><description><![CDATA[<p dir="auto">Дата(число) в $1 передана, а прочее нет.</p>
]]></description><link>https://forum.netxms.org/post/769</link><guid isPermaLink="true">https://forum.netxms.org/post/769</guid><dc:creator><![CDATA[isherim]]></dc:creator><pubDate>Mon, 10 Dec 2007 11:54:15 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Mon, 10 Dec 2007 11:10:34 GMT]]></title><description><![CDATA[<p dir="auto">а как передать эти параметры во внешний shell-скрипт?</p>
]]></description><link>https://forum.netxms.org/post/768</link><guid isPermaLink="true">https://forum.netxms.org/post/768</guid><dc:creator><![CDATA[weec]]></dc:creator><pubDate>Mon, 10 Dec 2007 11:10:34 GMT</pubDate></item><item><title><![CDATA[Reply to Передача параметров из Action в скрипт on Fri, 07 Dec 2007 12:47:56 GMT]]></title><description><![CDATA[<p dir="auto">Возможно. Делаем action например так:</p>
<p dir="auto">В конфиге агента:</p>
<pre><code>ActionShellExec = MyAction:my_script $1
</code></pre>
<p dir="auto">В настройках action на сервере делаем remote action, в поле action пишем</p>
<pre><code>MyAction "[i]текст[/i]"
</code></pre>
<p dir="auto">В тексте можно использовать макросы описанные в документации в разделе 8.6 (<a href="https://www.netxms.org/documentation/netxms_user_manual.pdf" rel="nofollow ugc">https://www.netxms.org/documentation/netxms_user_manual.pdf</a>).<br />
Например если я хочу передать имя хоста и текст сообщения то можно написать</p>
<pre><code>MyAction "%n %m"
</code></pre>
<p dir="auto">И вызываем этот action в event processing policy для нужных событий.</p>
]]></description><link>https://forum.netxms.org/post/763</link><guid isPermaLink="true">https://forum.netxms.org/post/763</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 07 Dec 2007 12:47:56 GMT</pubDate></item></channel></rss>