We have a large group of nodes that need to have an .exe running at all times. We have been operating on manual alerts that someone receives, remotes into the specified box and restarts the .exe. I would like to automate this process so that when the alert triggers SolarWinds launches the .exe remotely. I have this working using the documentation here (PSEXEC to start remote process), but this requires that the .bat file have the computer name designated in the .bat file. While this works, I'd like to find a way to push the node name variable down so that this can be applied to the hundreds of nodes I would like this monitoring.
Here is what I have so far
Network Path for Execute External Program settings:
"D:\SolarWindsScripts\BATCH.bat" >
\SolarWindsScripts\psexec_log.txt 2>&1
Contents of batch file:
@echo off
\SolarwindsScripts\pstools\psexec.exe -accepteula \\usogw7-551 -u USERNAME -p PASSWORD -i 1 -d "C:\DIR\DIR\DIR\FILE.exe
exit
Any guidance and help would be appreciated.