<?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[Actions for services]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">i want to create a template action which will start a service if it was stopped.<br />
i will create an event for that and event configuration corresponded.<br />
what i can't figure out is what are the variables i need to use ? i have tried understanding it from the on-line tutorials but no luck there.<br />
i want to create it to run via the agent, unless running it from the server is preferred.</p>
<p dir="auto">10x,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/topic/2245/actions-for-services</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:19:39 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2245.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Mar 2013 13:32:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Actions for services on Sun, 14 Apr 2013 14:24:50 GMT]]></title><description><![CDATA[<p dir="auto">hi victor,</p>
<p dir="auto">i have played with this for a while and finally i have solved the problem.<br />
i have discovered that the $x in the "action...." can be even a word. for ex. if %2 is "State of xxxxxx" then the $3 will be xxxxxx<br />
maybe there is a way to simplify the process ? what will happen when i decide to pass %1 instead of %2 ? will i have to run the agent in debug mode again to discover what params does it get ?</p>
<p dir="auto">Best Regards,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/post/10078</link><guid isPermaLink="true">https://forum.netxms.org/post/10078</guid><dc:creator><![CDATA[lindeamon]]></dc:creator><pubDate>Sun, 14 Apr 2013 14:24:50 GMT</pubDate></item><item><title><![CDATA[Reply to Actions for services on Thu, 14 Mar 2013 06:46:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">All %<em>number</em> macros refers to event-specific event's parameters. They can have different meaning for different events. For example, for threshold violation events %6 refers to "instance" attribute, and for event created from SNMP trap it will be varbind mapping #6. For well-known events you can see exact parameter meaning in event description.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/9917</link><guid isPermaLink="true">https://forum.netxms.org/post/9917</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 14 Mar 2013 06:46:53 GMT</pubDate></item><item><title><![CDATA[Reply to Actions for services on Wed, 13 Mar 2013 11:00:33 GMT]]></title><description><![CDATA[<p dir="auto">10x bdefloo,</p>
<p dir="auto">thank you for your help.<br />
i was aware of this possibilities but it is always good to refresh my memory.<br />
still there is one thing that i do not understand: why %6 ? what %1 refer too ?<br />
what happens if i have 2 parameters to pass ?</p>
<p dir="auto">Regards,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/post/9910</link><guid isPermaLink="true">https://forum.netxms.org/post/9910</guid><dc:creator><![CDATA[lindeamon]]></dc:creator><pubDate>Wed, 13 Mar 2013 11:00:33 GMT</pubDate></item><item><title><![CDATA[Reply to Actions for services on Wed, 13 Mar 2013 07:41:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">The parameters available in event processing are listed here:<br />
<a href="http://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing" rel="nofollow ugc">http://wiki.netxms.org/wiki/UM:Event_Processing#Macros_for_Event_Processing</a></p>
<p dir="auto">You can use up to 99 variables linked to a particular event with the macros %1, %2, ..., %99</p>
<p dir="auto">I can't seem to find any documentation of parameters for actions, but the principle is the same as parameters for ExternalParameter which are described in a stickied thread in the forums:<br />
<a href="https://www.netxms.org/forum/configuration/agent-config-(action-externalparam)/msg3136/#msg3136" rel="nofollow ugc">https://www.netxms.org/forum/configuration/agent-config-(action-externalparam)/msg3136/#msg3136</a></p>
<p dir="auto">Hope this helps,</p>
<p dir="auto">Kind regards,<br />
bdefloo</p>
]]></description><link>https://forum.netxms.org/post/9908</link><guid isPermaLink="true">https://forum.netxms.org/post/9908</guid><dc:creator><![CDATA[bdefloo]]></dc:creator><pubDate>Wed, 13 Mar 2013 07:41:13 GMT</pubDate></item><item><title><![CDATA[Reply to Actions for services on Tue, 12 Mar 2013 07:30:11 GMT]]></title><description><![CDATA[<p dir="auto">hi victor,</p>
<p dir="auto">so i have to assume that every action that i want the agent to run should be configured both on the agent and the server ?<br />
what type of actions i would typically run on the server ? could i have solved this problem by running a command on the server with reference to the malfunctioned node, assuming that the server is windows and it can run the "sc" command ?<br />
can i have a reference to the $1 and %6 uses ? where and when to use them ?<br />
i hope you will find the time to make some order in the help section to include all of this so we will not have to bother you with the little things.</p>
<p dir="auto">Best Regards,<br />
Lindeamon</p>
]]></description><link>https://forum.netxms.org/post/9894</link><guid isPermaLink="true">https://forum.netxms.org/post/9894</guid><dc:creator><![CDATA[lindeamon]]></dc:creator><pubDate>Tue, 12 Mar 2013 07:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to Actions for services on Mon, 11 Mar 2013 18:27:35 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">First, you have to create action on agent, like this:</p>
<pre><code>Action = StartService:net start $1
</code></pre>
<p dir="auto">Then you can create action object on server, which will execute agent's action "StartService" on node where service was stopped. You can set node address to %a (it will expand to node's IP address), and action to</p>
<pre><code>StartService %6
</code></pre>
<p dir="auto">assuming that you have service name entered into instance field in appropriate DCI.</p>
<p dir="auto">Then execute this action from event processing policy in reaction to service stopped event.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/9889</link><guid isPermaLink="true">https://forum.netxms.org/post/9889</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 11 Mar 2013 18:27:35 GMT</pubDate></item></channel></rss>