<?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[How to send automatic powershell commands when certain alarms go off.]]></title><description><![CDATA[<p dir="auto">Good Afternoon,</p>
<p dir="auto">I am new to NetXMS so I am hoping someone can point me in the right direction, I would like to be able to lets say: Server-A has SQL process "a" running. If that process was to unexpected stop, the netxms agent would execute a power-shell command to restart that service as soon as that warning came out.</p>
<p dir="auto">Thank You for any help in this matter in advance!  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /> <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/topic/5817/how-to-send-automatic-powershell-commands-when-certain-alarms-go-off.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 17:55:12 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5817.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Jan 2019 19:18:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to send automatic powershell commands when certain alarms go off. on Wed, 30 Jan 2019 00:46:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">If I understand correctly you want to monitor the state of MSSQL services (e.g. different instances) under Windows?</p>
<p dir="auto">We use instance discovery for that. Agent List with List name System.Services.<br />
An instance discovery filter script picks up any service that starts with "MSSQL$" in the name (excluding SQLEXPRESS) or is called "MSSQLSERVER" (default instance).<br />
To restart the service if it fails, a threshold is triggered if the service is not running.<br />
That threshold generates an event that in turn executes a Server Action via Event Processing Policies.<br />
That action is a script (inside the NetXMS script library).<br />
The script pulls out the service name from the parameters passed to it and executes a pre-configured action on the agent itself which effectively comes down to running "net start &lt;servicename&gt;".</p>
<p dir="auto">The restart part can obviously be used for any service, not just MSSQL. <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Hope that helps get you started.</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.netxms.org/post/25278</link><guid isPermaLink="true">https://forum.netxms.org/post/25278</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Wed, 30 Jan 2019 00:46:37 GMT</pubDate></item></channel></rss>