3 Replies Latest reply on Apr 10, 2012 11:28 AM by jphifer

    Unable to get PSExec alert action to work


      I have been banging my head on this issue for some time now. Here's the scenario:


      We have some remote servers that have multiple websites on them. We are monitoring these sites using SAM and an https monitor. We've set up an alert that is triggered when one of the site https monitors fail and the first escalation point for us is to receive an email (done from alert action successfully), and have the NPM recycle the application pool for the particular site.


      We've set up a service account and configured the Solarwinds Alerting Engine to use this service account. The account has admin rights. We've also set up an account on the remote server using the same service account credentials and made that account an administrator as well.


      Here's the Execute Program Action that we've got set up on the alert

      PSExec -h \\xx.xx.xx.196 appcmd.exe recycle apppool /apppool.name:appPoolName


      Some notes from our troubleshooting so far:

      1. Running this command from command line works fine.

      2. According to the AlertLog table in the database, the alert is triggering the execution of this command, but there's no indication of any output.

      3. We have set up the appropriate folder path in Environment Variables for both PSExec on the orion server and also appcmd.exe on the remote server

      4. We've tried to move this command into a batch file that outputs the information returned on execution to a log file and when we do that, no log file is even generated which tells me it didn't even run (even though the AlertLog says otherwise).


      Please help!

      Thanks in Advance!

        • Re: Unable to get PSExec alert action to work

          Bump... Anyone? Just some pointers on other things to possibly try would be great. Thanks!

          • Re: Unable to get PSExec alert action to work

            Most likely, it's a permissions issue.  If you look at the alerting service, it's likely running as one of the default service accounts.  If you were to change it to use a local or domain account, that you know had rights to PSExec and the items that PSExec was doing, you should see it work without an issue.  Try using the same account you were using from the command line.


            You may also be able to use the -p and -u command line arguments for PSExec to make sure that it is using the correct user(and not the service account being inherited from the from alerting service).

              • Re: Unable to get PSExec alert action to work

                Thanks for the response.


                Sorry. Forgot to mention that we've already set the alerting service engine to use the same local user account that has been set up on both servers using the same password. We have also tried including the -p and -u command line arguments in the alerting service and unfortunately that did not work either even though the -p and  -u command line arguments do work when running from command line.


                Any other ideas?