Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from superuser.com Aug 20 '09 at 19:04

This question came from our site for computer enthusiasts and power users.

    
Should also add that for my specific case, this is for an internal web server service, no public facing access. Also, that the IIS service goes down, not the whole server, so a client app running on the server monitoring the service would be acceptable. –  user17646 Aug 20 '09 at 20:07
add comment

7 Answers

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.

  1. Go to the Services control panel
  2. Right-click on World Wide Web Publishing
  3. On the Recovery tab select Run a Program from the various X Failure drop-downs
  4. Enter your script cmdline in the Run program panel boxes.
share|improve this answer
    
This would only work on the server itself; what if that fails? –  Massimo Aug 20 '09 at 19:20
    
Granted... –  squillman Aug 20 '09 at 20:03
    
The O.P. did note that it's only IIS going down, not the server itself, so I think this is fine. Besides, it'd be a simple script, so no buying and setting up new software (plus no additional software on the server, which the less extra 3rd party, I think the better). –  Dustin Aug 20 '09 at 20:20
    
Yeah, this looks to be about best, cheapest, fastest answer. I think I'll investigate this as a solution for our issue. –  user17646 Aug 20 '09 at 20:25
add comment

There are lots of choices in this question on Website Monitoring over at Stackoverlfow.

My company uses Nagios but your preference may vary...

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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
share|improve this answer
add comment

protected by Tom O'Connor Sep 25 '13 at 20:23

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?