Introduction
WebCheck is a Windows application that runs on your PC. It runs in the
background loading a web page of your choice as often as every 10 seconds. If
WebCheck cannot connect to your site or your page returns something unexpected,
WebCheck notifies you immediately by displaying a message or sending an email.
Get a pager account that can turn emails into pages and you'll be paged
immediately if your site goes down.
The web page you hit can be any page you want... your home page, a page that
accesses your database, or even a custom server-side script that goes out and
tests that everything on your server is functioning properly. WebCheck searches
the page for keywords and if it doesn't find them, you are alerted immediately.
Note: You are only alerted once when the status of your web site changes.
This way you are not bombarded with hundreds of emails or notifications until
you fix your site.
Quick Start Guide
Starting WebCheck
Once you've installed the software, run WebCheck by clicking the Start
button, selecting "Programs", select "ITutils", and finally select "WebCheck".
WebCheck will start and you will see the main window.
Running a test
Pull down the Sites menu and select "Add Site". Now you will see the site properties window.
Enter your site name. For example: My Website. Next enter the URL you would like WebCheck to hit. In the "Search for" text box,
type some text that you know to exist in your home page such as your company's
name. This way, if this text is not found in your web page, WebCheck will know
that there is a problem.
Errors
Click the Error tab at the top of the window. These settings tell WebCheck
what to do in case of an error. If you leave all the default settings, WebCheck
will pop up the main window showing the status of your web site, change the
system tray icon in the bottom right hand portion of your monitor to a blinking
icon and log the current time and date with the status of your site to a log
file.
If you want to send an email notifying you or someone else of the status of
your site, check "Email" and type the recipient's email address next to it.
Successes
The "success" settings are just like the "error" settings. To change them,
click the Success tab at the top of the window. These settings tell WebCheck
what to do in the event that your web site starts working after it has been
down. If you leave all the default settings, WebCheck will pop up the main
window showing the status of your web site, change the system tray icon in the
bottom right hand portion of your monitor back to the normal WebCheck icon and
log the current time and date with the status of your site to a log file.
If you want to send an email notifying you or someone else that your web site
is now working, check "Email" and type the recipient's email address next to
it.
Your ready to go!
Click OK and watch WebCheck do it's thing. Hide the main window if you'd like
to get WebCheck out of the way while you work on other things.
Site Properties

Site Name: This is the name of the site you wish to test. This can be anything you want and is for your own reference only.
Typically people use something like "My home page" or "Database test".
URL: This is the web page address (or URL) that you would like to
use for your test. The page can be anything you want including ASP, Cold Fusion,
Java Servlets, CGI-bin executables, and ISAPI DLLs. Pass information in the
request string if you like such as "http://www.myCompany.com/default.asp?Source=Test"
Search For: This is the text you would like to find in your web
page. Something that won't change such as your company name is a good idea. If
you are writing a custom test page, you might have it return the word "success"
if all tests were successful.
Case Sensitive: If checked, indicates that the text you are
searching for will be considered found if the capital and lower case letters
exactly match the search text.
Test every x seconds: This is how often you would like to run your
test. If you're concerned about WebCheck causing unncessary strain on your web
server, increase this number so the test is run less often.
Timeout after: If your web site normally takes 2-5 seconds to load
from your machine and you would like to be notified when it takes longer, enter
the maximum number of seconds for WebCheck to wait before it considers the test
a failure.
Errors

Popup main window: This indicates that the main
window should be brought to the foreground if an error occurs. The status of all
tests will be displayed in the main window.
Make a sound: Play a sound when your site goes down. Type in or browse for the path of any .wav sound file.
Send email to: This allows you to specify a recipient to send email
notification to if an error occurs. Emails are only sent once when the status of
your site changes. This way if your site's status changes, the recipient is not
sent an email every time the test is ran. If you would like to email multiple
people, separate them by comas or semi-colons. Note: In order for your
email options to work you must specify an email server and return address from the File|Options menu
on the main window.
Log to file: The file you enter here will contain a new entry each
time the status of your web site changes. The new entry will contain the time
and date and the current status.
Run a program: Launch an external program when your site goes do to fix the problem, perform custom notifications, run additional checks, or anything you can think of. Type in or browse for the full path of the executable program. If you want to pass specific commandline parameters to the program, enter them in the command line text box below your executable's path. Note: Most programs do not require command line parameters in order to run. Therefore, if you don't know what a command line parameter is, leave this 2nd text box blank.
Hit a web page: Hit another web page on your server to fix the problem or perform custom notification procedures. For example, you may have a web page with server-side script that will reboot the server if the time is between 12:00 thru 5:00 AM. You could then hit this page to restart the server when there is a problem.
NOTE: The icon in the system
tray (part of the taskbar) will blink if an error occurrs. The icon will
remain blinking until all web sites are working again.
Successes

Popup main window: This indicates that the main window should be
brought to the foreground when your site starts working again.
Make a sound: Play a sound when your site comes back up. Type in or browse for the path of any .wav sound file.
Send email to: This allows you to specify a recipient to send email
notification to if your site starts working again. Emails are only sent once
when the status of your site changes. This way if your site's status changes,
the recipient is not sent an email every time the test is ran. If you would like
to email multiple people, separate them by comas or semi-colons. Note: In order for your
email options to work you must specify an email server and return address from the File|Options menu
on the main window.
Log to file: The file you enter here will contain a new entry each
time the status of your web site changes. The new entry will contain the time
and date and the current status.
Run a program: Launch an external program when your site comes back up to perform custom notifications, run additional checks, or anything you'd like. Type in or browse for the full path of the executable program. If you want to pass specific commandline parameters to the program, enter them in the command line text box below your executable's path. Note: Most programs do not require command line parameters in order to run. Therefore, if you don't know what a command line parameter is, leave this 2nd text box blank.
Hit a web page: Hit another web page on your server to perform custom notification or additional tests.
Options

Load last profile on startup: Checking this box indicates that you would like to automatically load your last open profile the next time you run WebCheck. This feature is nice because it allows WebCheck to automatically start performing tests after a reboot.
SMTP server address: Enter your email server here. This can contain a fully qualified address such as mail.something.com or it can be an IP address such as: 111.111.111.111.
SMTP server port: This is the port number of your email server. In general email servers run on port 25 so enter this if you're not sure.
From name: This is the return name that you would like to appear in all emails sent by WebCheck. It can be anything you want.
From address: This is the return address that you would like to appear in all emails sent by WebCheck.
Creating Custom Tests
This is a very powerful feature that allows you to run custom diagnostics on
your server every time WebCheck performs it's test. Common things to check for
include making sure your database is working, checking for hard drive space,
accessing a computer over the network from the server... etc.
To create a custom test you will need to be knowledgable in a server site
scripting language. Any server side language will work including ASP,
ColdFusion, Java Servlets, CGI-Bin, or ISAPI DLLs.
Your custom test page would then run any system diagnostics you would like on
your server and return a code indicating a success or failure. You would then
have WebCheck search for the success code to know that everything is working
correctly.
Here is an ASP sample to check to make sure your database is working:
<%
On Error Resume Next
Set Cn = CreateObject("ADODB.Connection")
Cn.Open ConnectionString
Cn.Execute "INSERT INTO TableTest (RecordID) VALUES (-1)"
Cn.Execute "DELETE FROM TableTest WHERE RecordID = -1"
Cn.Close
If Err Then
Response.Write "Error"
Else
Response.Write "Success"
End If
%>
Here is an ASP sample that verifies that you have at least 100 MB of available disk space on your server:
<%
Set FS = CreateObject("Scripting.FileSystemObject")
' Get the physical folder of the current page
myPath = FS.GetParentFolderName(Request.ServerVariables("PATH_TRANSLATED"))
Set myFolder = FS.GetFolder(myPath)
' Get the drive of the physical folder
Set myDrive = myFolder.Drive
' Find out how much free space is available on that drive
FreeSpace = CInt(myDrive.FreeSpace / 1000000)
If FreeSpace < 100 Then
' Under 100 MB of diskspace is availabe
Response.Write "Only " & FreeSpace & "MB of diskspace is available."
Else
Response.Write "Success"
End If
%>
Note: Please consult your server-side language's manual for further information on how to create scripts that will test what you desire.