2 Replies Latest reply on Jan 8, 2015 5:05 PM by stripet

    Using SAM to start a remote program

    mtrimnell@majorhospital.org

      Im not even sure this is possible as I have been banging my head up against the wall on this for quite some time. I have a program which does not run as a service and I do monitor this program using SAM. I am trying to find a way to have SAM re-start this program if it dies for any reason.. I initially tried to run this program as a service so that I could have Solar simply re-start the service if it died but this program will not allow me to start it in that fashion. Any thoughts or ideas as to how I could accomplish this,, is it even possible? Any advice would be greatly appreciated

        • Re: Using SAM to start a remote program
          mharvey

          If it's a process that it's monitoring, you'd have to write a batch file that SolarWinds could then use via powershell to start the process.  However, oftentimes, the process will stop after the remote connection is released by SolarWinds.  What I've had to find, as we have a similar issue, is if there is a way to silently start the specific process by calling the exe itself.  Currently I haven't had success with it for the program I'm working with, but if there is a way to  do a silent start, then you could use powershell to run the batch file.

          • Re: Using SAM to start a remote program
            stripet

            mtrimnell@majorhospital.org

             

            This can be done, but it is kind of messy. (Assuming you are on Windows nodes)

             

            How we do it is we have SAM run a VBScript component monitor which checks WMI for the service status and if it is not running it will use the VBScript Wbem service (on the Win32_ScheduledJob service) Object to create a Scheduled Task job on the node (runs only once) which runs a local script (which you have to create and house locally on the node) to restart the services.  My VBScript is robust enough to check and see if the local script is already running so it does not try to start unless it is not already running.

             

            If you want to see my VBScript let me know and I can post it if you desire.

             

            Shawn