Submit a ticketCall us

Bridging the ITSM Divide
Integrated help desk and remote support software for faster resolution

Join us on Wednesday, November 29, 2017 at 11 a.m. CT, as we discuss the benefits of effectively integrating your help desk software with remote support solutions to help increase the efficiency of IT administration, improve communication, and decrease mean time to resolution (MTTR) for IT issues of all sizes. This directly impacts end-user satisfaction and your business’ bottom line. Register Now.

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