We wanted to monitor the reachability and responsiveness of our clients' websites. Obviously, you want to do this from multiple points and networks throughout the Internet. So what did we do?

We arranged for shell accounts with Perl, DBI for mySQL, and cron access. Then, every 15 minutes, the cron job measures ping times, packet loss, and the route. This data is then stored in a database on one of our servers locally. We also receive emailed alerts for high packet loss or total outage.

With that data and GD::Graph, we make some nice pretty graphs for our clients to see things like how hosting their website over that internal 64k ISDN line is a Bad Idea.

Replies are listed 'Best First'.
RE: Distributed network monitor
by perlcgi (Hermit) on May 05, 2000 at 16:16 UTC
    Sounds like a really neat solution. A useful addition to the script might be to use LWP to grab the same test file off each system and measure the response. I reckon this virtual-browser approach is valuable and perhaps a more indicative measure of performance than comparative ping times: (i) because servers will respond to ping even when their httpd is down/overloaded and no service is actually in effect, and (ii) downloading a page is likely a more realistic measure of what a user will actually experience. What do you reckon?
      I agree with your comment about downloading a page from the server.

      As you point out, the only thing that Ping tells you is that the machine is switched on and is running ping!

      Personally I wish this author would make the code available - I have e-mailed him and not received a reply. It sounds like a seriously cool script. If anyone knows of any similar scripts, please do post details here!

        You might be able to achieve what you want with MRTG. Alternatively, I wrote some scripts a while back to produce this. A cronjob runs an LWP download from each site being measured on the hour, every hour. It simply measures download time from each site, sticks results in a flat file (not even a database). A cgi script calculates site performance averages, and displays a simple graph. So it's pretty lame, does'nt account properly for time-outs, but might get you started. Let me know if you want it.
RE: Distributed network monitor
by Anonymous Monk on May 04, 2000 at 02:20 UTC
    That is exactly the kind of script I have been looking for! The graph making is really the icing on the cake -- I had never planned anything that fancy.

    Any chance of making the code available?

    Cheers, Nick

      Unfortunately, I can't make the code available at this time since I wrote it while working for my employer. It might be a possibility in the future with some more convincing. Maybe we'll GPL it.