Network Management

Test the Execute External Program alert action in the Orion Platform

Steps to test Alert action Execute External Program.

First published date

6/10/2019 5:22 PM

Last published date

6/24/2022 5:45 PM

Overview

Test an action for an Alert to "Execute External Program".

Product section

Network Performance Monitor

Resolution

To test SolarWinds functionality do the following:


Option 1 (Execute an External Program)

  1. Create an alert

   Trigger condition = Node Status is equal to UP

  1. On Trigger Actions do:

   Add Action = Execute an External Program

  1. Create a C:\Test folder share
  2. Create a CMD name it "test.cmd"

    Inside the file looks like this:   net stop Spooler

  1. Create a CMD name it "test2.cmd"

    Inside the file looks like this:   net start Spooler


Network path to external program: \\<Server IP>\Test\test.cmd
Network path to external program: \\<Server IP>\Test\test2.cmd

Test and see if Print Spooler Stops and starts when you execute the alert trigger.

 

Option 2 (Execute an External VB Script)

  1. Create an alert

   Trigger condition = Node Status is equal to UP

  1. On Trigger Actions do:

   Add Action = Execute an External VB Script

  1. Create a C:\Test folder share
  2. Create a VBS name it Stop.vbs.

    Inside the file looks like this:   
 

Option Explicit
On Error Resume Next
Public Sub StartApplication(App, WindowStyle)
dim aShell
set aShell= CreateObject("WScript.Shell")
aShell.Run App,WindowStyle
set ashell=nothing
end sub
                    
StartApplication "%SYSTEMROOT%\system32\sc.exe stop Spooler",0
on error goto 0

 

  1. Create a VBS name it Start.vbs

    Inside the file looks like this:   

Option Explicit
On Error Resume Next
Public Sub StartApplication(App, WindowStyle)
dim aShell
set aShell= CreateObject("WScript.Shell")
aShell.Run App,WindowStyle
set ashell=nothing

end sub
                    
 StartApplication "%SYSTEMROOT%\system32\sc.exe start Spooler",0
 on error goto 0

 

 

Network path to external program: \\<Server IP>\Test\Stop.vbs
Network path to external program: \\<Server IP>\Test\Start.vbs

Test and see if Print Spooler Stops and starts when you execute the alert trigger.