1. Technology

Creating a simple service monitoring CGI script


1 of 5

Starting the script
Creating a simple service monitoring CGI script
If you're responsible for more than one web server, or multiple services on one or many servers (SSH, FTP, Web, etc). It can be a little difficult to make sure all your services are up and running. There are several programs on the web that assist in monitoring servers, some of which even email you when a machine or service goes down. Since we're trying to learn more about Perl, though, let's roll our own simple CGI solution for monitoring the status of multiple servers and services.

First things first, we'll need to pull in a couple of Perl modules that you might or might not already have installed. They are IO::Socket and CGI. One is for basic socket communications, and the other (as expected) makes creating CGI applications a snap.

  1. About.com
  2. Technology
  3. Perl
  4. Applied Programming
  5. Creating a simple server monitor in Perl to check the status of your internet services.

©2014 About.com. All rights reserved.