Looking for some software / methodology to monitor a Windows 2003 server and (hopefully) send out an e-mail out when the IIS server service stops / IIS goes down.
Thanks.
Looking for some software / methodology to monitor a Windows 2003 server and (hopefully) send out an e-mail out when the IIS server service stops / IIS goes down.
Thanks.
One option, short of using third party service monitoring tools, is to create a script that will send out an email (or other similar alert) and then configure the service to run that script when the service fails.
There are lots of choices in this question on Website Monitoring over at Stackoverlfow.
My company uses Nagios but your preference may vary...
PA Server Monitor can watch a web page and/or watch the IIS service. When down it can alert and optionally also restart the service for you.
There are lots of monitoring products out there (including Operations Manager from Microsoft); if you want some custom-built solution, you need to put together something that can make an HTTP request to your web server and send an e-mail if it doesn't get answered properly; you can do that with some VBScript or PowerShell.
At my company, we use a couple of methods to monitor our web servers.
Internally, we use Nagios to monitor CPU, memory, disk utilization, uptime, etc.
Because there's situations where your internal server may not be able to send emails, we setup third-party monitoring through Montastic. It's free and will monitor a bunch of sites. You can also set it up to notify several email addresses of outages. Ours notifies our company email addresses as well as an external "emergency" account.
I like ServersAlive. http://www.woodstone.nu/salive/ in addition to monitoring web servers, it can monitor databases, e-mail servers, ping, etc. It also enables you to verify the chain of dependent network components that sit in front of the web server. This helps you determine the reason your web server is down (switches, routers, DNS, etc.) because it's often not the actual server that is experiencing problems.
From here:
Under the Services application, select the properties of the service in question.
View the recovery tab - there are all sorts of options - I'd set First & Second Failure to Restart the Service, Third to run a batch program that BLAT's out an email with the third failure notification.
You should also set the Reset Fail Count to 1 to reset the fail count daily.
EDIT:
Looks like you can do this via a command line:
SC failure w3svc reset= 432000 actions= restart/30000/restart/60000/run/60000
SC failure w3svc command= "MyBatchFile.cmd"
Your MyBatchFile.CMD file can look like this:
blat - -body "Service W3svc Failed" -subject "SERVICE ERROR" -to Notify@Example.com -server SMTP.Example.com -f Administrator@Example.com