5

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.

1
  • 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, 2009 at 20:07

7 Answers 7

4

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.
4
  • This would only work on the server itself; what if that fails?
    – Massimo
    Aug 20, 2009 at 19:20
  • Granted...
    – squillman
    Aug 20, 2009 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, 2009 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, 2009 at 20:25
2

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

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

1

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.

0

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.

0

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.

0

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.

0

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 [email protected] -server SMTP.Example.com -f [email protected]
1
  • Can it used to monitor webiste and reset IIS app pool if website is down?
    – Krunal
    Jul 3, 2019 at 15:27

You must log in to answer this question.