The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

checkServers.pl - check the status of (possibly external) servers

SYNOPSIS

   (command line tool)
   perl checkServers.pl {--debug} {--timeout=xxx}

The optional "debug" switch enables (rather verbose) progress messages.

The optional "timeout" switch allows you to specify the timeout value for retrieving web pages. The default value is 120 seconds (2 minutes).

DESCRIPTION

This command-line script makes web connections to a list of URLs which may reside on the server running this script, or on external servers. The script will retrieve the HTTP status code and if it receives a value other than 200, will e-mail an error message to a preselected list of addresses.

CONFIGURATION Before running this script, edit the file checkServers.pl. The values that need to be edited are:

  • $mail{Smtp} = 'mail.server'; Set this line to the name or IP address of your outgoing (SMTP) mail server

  • %urls Set this hash to the URLs to be tested

  • @emails Set this array to the list of e-mail addresses to be notified when a URL scan produces a failed result

    On Linux/Unix systems this can be easily accomplished with the following command lines: cpan install LWP cpan install Mail::Sendmail cpan install Getopt::Long

    On Windows systems, running ActiveState Perl (http://www.activestate.com), you can easily install these modules by running the "ppm" program, and issuing the following commands: install Mail::Sendmail install Getopt::Long 1

AUTHOR

Written by Daniel Mahoney <dan@trinetcom.com>

COPYRIGHT

Copyright (c) 2006 by Trinet Internet Solutions. All rights reserved.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 46:

'=item' outside of any '=over'

Around line 63:

Unknown directive: =head

Around line 78:

You forgot a '=back' before '=head1'