Submit a ticketCall us

Training Class Getting Started with SolarWinds Backup - February 28

This course offers customers an introduction to SolarWinds Backup, focusing on configuring the backup technology, taking backups, data restoration and data security. It is a great primer and will get you up to speed quickly on SolarWinds Backup.
Register for class.

Home > Success Center > Network Performance Monitor (NPM) > Test alert action: Execute External Program

Test alert action: Execute External Program

Table of contents

Updated September 9, 2016

Overview

Steps to test Alert action Execute External Program.

Environment

All NPM versions

Steps

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
2. On Trigger Actions do:
   Add Action = Execute an External Program
3. Create a C:\Test folder share
4. Create a CMD name it "test.cmd"
    Inside the file looks like this:   net stop Spooler
5. 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
2. On Trigger Actions do:
   Add Action = Execute an External VB Script
3. Create a C:\Test folder share
4. 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

 

5. 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.

 

 

 

Last modified

Tags

Classifications

Public