Perl Script to Test URI Status

This Perl script was a little test to see the URI status for multiple URIs, related services, status codes, and response times. The purpose of this Perl script is for base-lining multiple websites and generating a before and after reports, automating your URI status testing.

For example, if we do a firewall change we want to know if all ports and sites are still accessible. This script can tell us quickly the status of all URIs in the list.

Please give credit for it’s creation. It tests a few things, mostly as a demonstration of what can easily be scripted in a few hours of Perl. If you would like a custom script created for you, please contact us for custom Perl programming.

Here are a few of the things this URI Testing script demonstrates:

  • HTTP Status codes
  • Windows ANSI Terminal Colors
  • Response load time (doesn’t include all images, only HTTP)
  • HTTP Response size (for baselining)
  • Specific Text on the HTTP/S page
  • Open Ports
  • Additional HTTP Status Messages

As written, it could be used for both server checks and website status checks, but a good improvement would be to add a mail feature or other similar log so you can run your URI tests on a cron schedule.

Please let use know if you use it. If you want help with your Perl scripting or have an idea for something you want written in Perl, please contact us Perl Development.

 

Leave a Reply

Your email address will not be published. Required fields are marked *