This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Struggling with getting Active Alert to restart a certain Application Pool

Hi all, I know I have posted before but really struggling on finding the best solution for a problem we have.

Explanantion:

We have 9 servers, that all run the same website.  We currently have an issue (long story) where one of the application pools needs to be reset when a certain Event ID is triggered, this can be sporadic and on any of the 9 servers.  Currently we have an active alert that when the Component Name "Hash Table Insert Event" (custom component) is equal to down an email is triggered and we then RDP to the server that has triggered the alert and recycle the application pool manually.

What we are now being asked is that when this active alert is triggered, are we then able to some how get an external program to run that will recycle the application pool manually on the server that has the error.  We have attemped numerous ideas but with no success.... is anyone able to help ?

  • How are you attempting to restart the application pool? Are you struggling to trigger an alert based on the proper event ID, or are you having issues with the trigger condition?

  • Hi aLTeReGo,

    Getting somewhere.

    We run the following from command prompt on SAM server:

    "C:\Program Files\Psexec" \\servername -h -s -u dmz\****** -p ****** c:\windows\system32\inetsrv\appcmd recycle apppool TEST

    This successfully recycles the app pool TEST but if we then add the above to a "Program to execute" and test the trigger it states successful but the app pool does not recycle....

  • Since you already have monitor setup and configured to watch for this event, and an associated email alert trigger the process is fairly straightforward. You'll want to add the Execute an external program Trigger Condition to your existing alert. Then enter in the command line arguments required to recycle the application pool. You will most likely need to change the Windows Service account that the Advanced Alert Manager runs under as discussed in this thread here. The Advanced Alert Manager runs under the local system account which does not have permissions to access the network. Once you've added the new trigger condition, changed the service to run under an account that has sufficient privileges, and restarted the service the alert should fire properly and automate this now manual task.

    External Program.png

  • AppInsight for IIS, which is part of the SAM 6.2 beta, includes native Application Pool monitoring and the ability to restart application pools from within the new web based alert manager.

    IIS Alert Trigger Action.png

  • The latest AppInsight for IIS will let you start/stop/recycle the app pool but I just found out that the PS command actually just stops/(waits 3 sec)/starts instead of a actual recycle. I have a open ticket and will update more at a later date.