screenshot

mirmon - monitor the status of mirrors

mirmon - what it is

Many software projects are mirrored worldwide. The mirror sites are required to update the mirror archive regularly (daily, weekly) from a root server.

Mirmon helps administrators in keeping an eye on the mirror sites. In a concise graphic format, mirmon shows each site's status history of the last two weeks. It is easy to spot stale or dead mirrors.

mirmon - how it works

screenshot
Every hour the root site writes a fresh timestamp somewhere in the archive; mirror sites copy this timestamp when they update the mirror archive. Mirmon periodically retrieves these timestamps from the mirror sites. It generates a html report and a flat state file.

Mirmon's actions and report are directed by a config file. There are many configuration parameters, but most have acceptable defaults. Only a few project specific items need to be specified. Once configured, mirmon can be run by cron every hour. Mirror sites are probed at certain (user defined) intervals (default every 4 hours). Sites that are (temporarily) unreachable are probed more often (by default hourly) until a probe is successful.

A Perl module Mirmon.pm is included in the package. This module makes it easy to create applications like : mailing admins of stale mirrors, directing users to fresh mirrors, etc.

mirmon - documentation, source

mirmon at work

tips & tricks : smarter probes

Apparent limitations of mirmon can usualy be overcome by using a smarter probe, that is smarter than plain wget or curl.

case 1 : a different TIMESTAMP format

Mirmon expects the probe to deliver a line starting with something like a timestamp :
  1189065601
This is easy if the TIMESTAMP files on the mirrors contain just that. In the mirmon config file, the probe can be specified as
  probe /usr/bin/wget -q -O - -t 1 %URL%TIMESTAMP
If however, the TIMESTAMP files are in a date-like format
  Thu Sep  6 08:00:01 UTC 2007
the probe has to be a little smarter and convert dates to timestamps :
  probe /usr/bin/wget -q -O - -t 1 %URL%TIMESTAMP | date --file - +%s

case 2 : probing rsync sites

Suppose you would like to use mirmon to monitor rsync sites. Simply using wget or curl won't do, because rsync isn't suported in the way you want.

The solution is to roll your own smarter probe. Write a small Perl program that interprets rsync-urls, and retrieves the TIMESTAMP files by rsync.

In the mirror_list, specify a mirror like:

  us rsync://rsync.apache.org/apache-dist/
Basically, the perl program has to Included in the mirmon distro is a sample program probe, that handles ftp, http and rsync urls.

Valid HTML 4.01 Transitional Tue Feb 13 08:14:59 CET 2018 -- Henk P. Penning dev