-
Use WebPageChecker - MAXIMIZE Server Uptime!
-
Download WebPageChecker NOW! and MAXIMIZE server uptime!
First of all, WPC is a simple, yet, powerful program. Meaning, it is simple
to install and configure, yet powerful in what it can do with its many options. Please take the time to study the configuration options of this program BEFORE YOU USE IT. It cannot destroy your system. It only reads Web pages. We have also provided some sample configurations for you to get started.
The beauty of WPC is that it is small and works very fast. It does not merely PING your servers, like most programs of its type do. And, it does not simply stop/restart/resume services. It will physically check if your services are running by testing user-definable Web pages that use these services. This way you can configure WPC to test all the technologies that run on your server. And, you can tell WPC what to do in the event one of the technologies is down or is experiencing a problem.
WPC typically runs on the server in order to be able to stop/start/kill services, check available memory, and reboot the server. However, WPC can be run remotely on a Windows workstation and check web pages on a web server. WPC checks web pages the same whether it's running on the Web server or on a Windows workstation. Even running on a workstation it will email you and notify you of a down page, hence, a down server.
We use WPC on our Web server to maintain its uptime. In the event *anything* happens WPC emails our Skytel account, which in turn, beeps our Timex/Motorola BeepWear watches. We are notified immediately. We are notified when the server's available memory is low and whether or not, after WPC restarts the defined service, memory is released. We are notified if the IIS service has crashed and whether or not WPC was able to kill the process and restart the inetinfo.exe process.
WPC has many uses. It is best run via a scheduler. Win2000/2003 scheduler we recommend or any third party scheduler will work fine.
We run WPC every 10 minutes on our server.
----------------------------------------
Use WPC as a temporary diagnostic....
----------------------------------------
Example: All of a sudden your server is eating memory at a rate of 50 - 60 megabytes daily. You know what service is the culprit ( you can view the service and its memory usage in the task manager) but you don't know why. With WPC you can set it to monitor memory, and when it reaches a pre-defined low, have WPC stop and restart the offending service and regain your servers memory. Or, you can simply tell WPC to reboot the server. Of course this is just a patch until you can locate the offending memory eater.
-------------------------------------------------------
Let's go over some of the configuration options of WPC.
-------------------------------------------------------
This information is in the webpagechecker's ini file as well.
It is a little bit more explanatory here, though.
==============================================================
[INIT PARAMETERS]
Set to '1' during testing. WebPageChecker will display messages to your screen. When all is well set to '0'
----------------------------------
displayMessages=0
----------------------------------
If you want WebPageChecker to email you each time an error occurs, set this directive to '1'
(1=Yes or 0=No)
Be careful with this option.
If you are having WebPageChecker email your beeper or pager watch and you email
the logfile each time as an attachment, you will be charged for the characters
ini the error log file. Could get expensive. Our pager watches cost $11.00 a month
for 3,000 characters. If you email the error log it adds up quick.
----------------------------
emailErrorLog=1
----------------------------
Setting 'showMessage' to '1' will display what is happening along the way.
It will display the domains to check, the pages to check, the server response
code, just about everything. When you are happy with all the values you have
chosen, set this value back to '0'. Use this variable for testing purposes only.
The difference between this directive and the 'runsilent' directive below is that
this directive will stop on each message and prompt you to click OK to continue, 'runsilent' will not.
----------------------------------
showMessage=0
----------------------------------
Set to '0' and messages will display along the way. Use this feature for setup and configuration
of WebPageChecker. Set to '1' and messages will not appear. Set to '1' while running WebPageChecker
via a scheduler. This is the best way to watch what's going on.
'runSilent' is different than showMessage above in that it does not require
user intervention (clicking the OK button) to continue.
----------------------------------
runSilent=1
----------------------------------
(1=Yes or 0=No) Play a midi file upon finding an error
Enter a path to a midi file. If WPC cannot locate the file, it won't play it. It can't.
(Example: c:\pathtomidi\myfavoritetune.mid)
----------------------------------
playMidiFile=0
midiToPlay=
---------------------------------
Set your computer name here. Use the two slashes as shown. If you don't know your computer name
look in: start > settings > control panel > system > Network Identification properties
---------------------------------
computerName=\\poolfact
---------------------------------
To check Web pages, set this value to '1' if you do not wish to check Web pages then set to '0'
NOTE: you must checkWebPages if you want to check if IIS is running.
----------------------------------
checkWebPages=1
----------------------------------
Set this to the number of seconds to timeout the Web page connection. The default is 600
----------------------------------
connectionTimeOut=
----------------------------------
Set this directive to the number of times WebPageChecker should test each page.
WebpageChecker will test the page this number of times and if a response other
than ERROR appears, WebPageChecker will assume the page is good.
A return code of ERROR tells WebPageChecker that the IIS
service is not running. It is a good idea to test the pages at least twice.
This will help eliminate any false alarms. We test our pages at least three times.
----------------------------------
numTimesToRun=3
----------------------------------
Minimum available memory to check for on your server. Set this to the literal value to check
(i.e., to check for 200 mb available ram set this to 200000000)
-------------------------------------
memoryCheck=90
-------------------------------------
Define a program to run in the event that the memoryCheck value is met.
Here you can run any program: exe,bat,com as long as the program is found.
A bat file is a likley candidate here. In the bat file you can run a multitude of programs.
For example: iisreset.bat is a good program to run if dllhost is consuming memory. Or, cycle_cf.bat is nice when
your ColdFusion server is a suspect of suckung up memory.
Or, you can run both bat files if you want to be safe.
--------------------------------------
memLowProgramToRun=
--------------------------------------
In the event the memoryCheck meets its value, and the 'memLowProgramToRun' fails to
release the memory, do you want to restart the server? (1=Yes or 0=No)
--------------------------------------
memRestartServer=0
--------------------------------------
(1=Yes or 0=No) If the 'memoryCheck' value is met, and 'memRestartServer' is set to '0'
and 'restartServer' is set to '1' the server will be rebooted. In other words, if
the 'memoryCheck' value is met, the server will reboot unconditionally.
--------------------------------------
restartServer=0
--------------------------------------
The message to display during reboot. This message will flash in a dialog box on the console.
----------------------------------
rebootMessage=Should have used Linux for this Server
--------------------------------------
(0=No 1=Yes) If you want the Web Publishing Service process killed then set this value to '1'
If set to '1' the inetinfo.exe process will be killed, restarted, and the page will be checked
again. You can use the directive below 'rebootIfkillItFails' in conjunction with killIt.
'rebootIfkillItFails' will reboot the server if 'killIt' fails to solve the problem
NOTE: you MUST use the 'checkWebPages' directive and have at least one Web page defined under
the 'PAGES TO CHECK' section below in order for this function to work. If we don't check a Web
page we can't tell if IIS is responding to our requests or not.
------------------------------------------
killIt=0
------------------------------------------
This option will run a program (i.e., bat, exe, com) under the same conditions as the killIt directive. In other
words if a web page is checked and the word ERROR returns (i.e., in our program the result code of ERROR
means that IIS is not running) a bat file will be run.
IMPORTANT: In order to use this feature do not set killIt above to '1' set it to '0' you don't want to
kill the inetinfo.exe process AND run the bat file. You can, but it would be a waste of time. Also, if webpagechecker
cannot find the program defined below it will not run anything.
------------------------------------------
runAProgram=
------------------------------------------
(0=No 1=Yes) If killing inetinfo.exe fails to solve the problem, you can elect to reboot the
server with this directive. If you set this directive to '0' the server will not be
rebooted, instead, you will simply be notified that the inetinfo.exe process was killed, the
page was rechecked, but IIS is still not serving pages.
You can test this by shutting down your DNS server. This will simulate IIS not responding.
--------------------------------------------
rebootIfkillItFails=0
--------------------------------------------
This is a new feature. WPC will see if a process is running, if it is, it will kill it.
If you want to use this feature simply set the 'killAProcess' directive to '1' and set
the 'processToKill' equal to a valid task. We used this once because our server was attacked and
the ping.exe process was invoked 20 tiimes on our server. While we were troubleshooting we
added this feature to kill the ping processes.
--------------------------------------------
killAProcess=1
processToKill=ping.exe
--------------------------------------------
The directory to write the web page output file to.
Must have write permission.
The default is the install dir of 'c:\dscinc\webpagechecker'
-----------------------------------------
webPageOutDir = c:\dscinc\webpagechecker
-----------------------------------------
Here is the crux of WebPageChecker
The PAGES TO CHECK values represent the domain to check and the actual
page in the domain. It's pretty simple really. If the second value
is not present, WebPageChecker will use one of the default index files in the Web's root.
So, it really doesn't matter if the right side of the equals sign is blank. What does matter
is that you place a value in here which represents each technology on your server. Example:
One for ColdFusion, iHTML, ASP, maybe a PERL page etc. And, a page which contains a database.
[PAGES TO CHECK]
---------------------------------------------------------------------
www.magicstore.com=/store/dsc_topten.asp
www.magicstore.com=/webpagechecker.cfm
-------------------------------------------------
This section represents the search strings you want WebPageChecker to look for in each page it checks.
If you stop your ColdFusion server, for example, and load a page, you'll receive a diagnostic
message. Cut and Paste a line of text from this message and use it here. Then, when
WebPageChecker locates this piece of unique text, it will know what service went down.
We've listed some text strings to get you started.
What happens is, when WPC scans your Web page and finds one of the error messages below,
it will first:
1. KILL the Service defined in the first position, then, it will
2. RESTART the service defined after the comma.
The reason we KILL the process first is because, usually, a service stops because it is hung up.
If it is hung up it will cease to respond to any control inputs (i.e., a request from WPC to restart).
So, when WPC, or any program attempting to interface with the service, tries to "talk" to the service
it will lock up and do nothing. We eliminate this possible problem by simply KILLING the
process first, then STARTING it.
NOTE: It is not neccessary to put a line in here for the
World Wide Web Publishing Service (IIS), we check that automagically
when you elect to check web pages.
The format is:
1. The process to kill
2. The service to restart
seperated by a comma
[SEARCH STRINGS TO CHECK]
-----------------------------------------------------------------
ODBC Error Code=
Data source not found and no default driver specified=
Windows NT error number 2 occurred.=
Cannot find server or DNS Error=My DNS SERVER SERVICE,mydns.exe
Server busy or unable to fulfill request=ColdFusion Application Server Service,cfserver.exe
Error Occurred While Processing Request=
-------------------------------------------------------------------
A little on the SMTP settings:
host - your SMTP server. Either the domain name (i.e., mail.ourserver.com) or the
IP# (i.e., 216.232.11.1) either way will work.
fromaddr - your FROM address. Some mail servers require this to be a valid email
address on the mail server. So, make sure it is.
port - for SMTP usually 25. If you know yours is specific then change this, otherwise, leave it alone.
tolist - The email address or news-group name of the recipient. You can specify multiple
to addresses, by specifying a tab- or vertical bar-delimited list. NOTE: You can also use
addresses of the longer form, i.e, "john cesta john@cesta.com" and the older variant,
john@cesta.com(john cesta).
cclist - The email address of the recipient. You can specify multiple cc addresses, by
specifying a tab or vertical bar-delimited list.
bcclist - The email address of the recipient. You can specify multiple bcc addresses, by
specifying a tab or vertical bar-delimited list.
subject - you can put what you want here to appear as the subject in your email.
The WPC, however, will append the relevant error message to this subject.
So, don't make it too long.
msg - this is what you want in the body of the email message.
You don't need too much here as the relevant error message from
WPC will already be in the subject line.
attachments - You can attach any file you'd like here but a good
idea is to attach the WPC error log file to the email.
Also, maybe you want to attach the IIS error log or the ColdFusion error log etc.
tolist would look like - "wart@wartman.com|dude@bestdude.com|fred@andethel.com"
[SMTP INFO]
host=smtp.yoursmtp.com
fromaddr=john@yourdomain.com
port=25
tolist=beepme@yourpageraccount.com
cclist=
bcclist=
subject=Server is messed up
msg=Web site error
attachments=

