Dimke WebMon for webserver monitoring allows to monitor a distant webserver.
Depending on how it is configured, Dimke WebMon will send you email notifications and write
the results into a webserver logfile.
|How it works:
Dimke WebMon contacts to a distant webserver of your choice and checks if a certain document is
accessible, and if it has changed since the last check using the HTTP HEAD command.
Using HTTP HEAD instead of HTTP GET is sufficient to provide the necessary information about
the so called reference file and keeps the network traffic very low.
Dimke WebMon is completely written in Perl for Unix and is based on the legendary LWP library which allows
to communicate with any kind of webservers. If the desired information about the reference file cannot be
retrieved, Dimke WebMon assumes, that the server is down or at least there are severe network problems like
misconfigured firewalls and sends a notification about this malfunction.
As soon as the server is up again, or, technically spoken, Dimke WebMon gets a sensful response to its
HTTP HEAD request, Dimke WebMon will notify you again to inform you about the server is running again.
Moreover, if the timestamp within the HTTP HEAD information differs from the value stored in Dimke WebMon's
header information file, in other words, if someone had updated the reference file in the meantime,
Dimke WebMon will inform you about it and will, for your convenience, provide you with a clickable
link to the document.
For privacy purposes you have the choice to write the email addresses into the to.txt file, or into the
bcc.txt file, or into both files. So, if you do not want people to see who gets these email notifications,
just put the email addresses into the bcc field. In this case you can even leave the to.txt file empty whithout
getting an annoying entry in the to- field reading "undisclosed recipient" or similar trash.
|How to use:
First, get the zipped package, unzip it and transmit it to your server.
It is recommended to mkdir a new directory, which is not accessible from any webserver process
which eventually runs on the same machine to prevent hacking attacks.
Do a chmod u+x webmon.pl on the command line to make it executable.
Be sure that the LWP library is installed because Dimke WebMon makes heavily use of the classes defined within
this object oriented library. If it is not present then contact your system administrator
or install it yourself.
Then edit the to.txt and / or bcc.txt file as well as the main program file webmon.pl where you should define
where the configuration file webmon.cfg is located, which has to be also edited according to your needs.
Then verify that everything is set up correctly by manually modifying or deleting the headinfo.txt file
and start Dimke WebMon by hand typing ./webmon.pl on the command line in the directory where
you had put the files contained in the package.
For your convenience Dimke WebMon will create a new logfile and automatically write the appropriate information
like reference file name and which column means what, any time Dimke WebMon does not find the logfile when started.
If all works satisfyingly, you are encouraged from now on to invoke Dimke WebMon from out of the UNIX crontab,
so that Dimke WebMon will be started automatically within sensful intervals.
Just type "crontab -e" on the command line and add the following or a similar line - the following example
shows how to define a cron job which will start Dimke WebMon once per hour beginning at 5:59 in the morning
and ending at 9:59 in the evening from Monday to Friday:
59 5-21 * * 1-5 /full/path/to/webmon.pl 2>&1 >/dev/null