We have a Powershell script that checks if an Application pool goes offline, starts it en sends an email to admin.
To get you started, here is the core of the script:
$stoppedpools = Get-IISAppPool | Where-Object{$_.State -like "Stopped"} | ForEach-Object {$_.Name}
foreach ($apppool in...