Navigation:  System Health Monitoring >

Monitor IIS Web Sites

Top  Previous  Next

While EventSentry does not natively monitor individual web sites inside IIS, you can easily achieve this functionality using a visual basic script in conjunction with the Application Scheduler feature. This will allow you receive an email anytime an IIS web site is not running.

 

Follow the steps below to setup IIS monitoring.

 

Create the embedded script

 

1.Navigate to the embedded scripts (Tools -> Embedded Scripts) dialog, so that the script to monitor IIS web sites is automatically copied to the target computers.

 

2.Create a new embedded script, and name it "iis_monitor_sites.vbs". Make sure that you set the "Interpreter" to cscript.exe, which ensures that we can capture the return code (%ERRORLEVEL%) correctly.

 

3.Paste the contents of the iis_list_stopped_w3svc_sites.vbs file into the "Script Content" field.

 

Create a system health package with the application scheduler

 

1.Create a new System Health package (right-click "System Health Packages"), and add the "Application Scheduler" object to it.

 

2.In the Application Scheduler object, make sure that Log application return code > 0 to event log as "Error" is checked. This ensures that the EventSentry will log an error to the application event log when the script returns an %ERRORLEVEL% that is not zero.

 

3.Click the plus icon and select the script we created earlier (@iis_monitor_sites.vbs) from the drop-down list. Set the schedule up as recurring and configure the desired interval (e.g. every 5 minutes).

 

4.Assign this package to all computers running IIS. Alternatively, you can also make this package global, and use the "Auto-Detection" feature to only activate the package on computers that have the w3svc service running.

 

Alert or Warning 1 24 n g

Note: If the script does detect an IIS site that is not running, then EventSentry will continuously log an Error to the application event log (based on the interval setup in (3) ) until the site is running again.

 

We recommend setting up a threshold filter, to ensure that you only get a limited number of emails with the alert.