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.
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.
svn relocate NEWor
svn switch --relocate OLD NEWwith
OLD = https://subversion.cs.uu.nl/repos/staff.henkp.mirmon NEW = https://svn.science.uu.nl/repos/project.mirmon
project status mirrors @mirrors.apache.org altlinux at altlinux.org apache at apache.org : us eu us-ooo eu-ooo test status CentOS at mirror-status.centos.org beta cpan at mirrors.cpan.org - retired mirrors test cran at cran.r-project.org release old ctan at dante.de LibreOffice at download.documentfoundation.org exim at exim.org : www ftp FreeBSD at mirmon.hub4.fr frugalware at frugalware.org gentoo at mirrorstats.gentoo.org GNU at download.savannah.gnu.org : http-gnu - all-gnu GNU Savannah at download.savannah.gnu.org GRML live at mirror.grml.org intergenia at mirror.intergenia.de jenkins at jenkins-ci.org MidnightBSD at midnightbsd.org OpenBSD at spacehopper.org: current snapshots snapshots/sgi patches openoffice at www.apache.org openVZ at mirrors.openvz.org opera at mirror.opera.com postfix at porcupine.org : source web repoforge at mirror-status.repoforge.org salix at salixos.org SMEserver at mirror.contribs.org sugarlabs at mirrors.sugarlabs.org TeX live at tug.org pretest Unity Linux at unity-linux.org xbmc.org at mirrors.xbmc.org currently inactive or starting up debian at mithril-linux.org - cdn japan kde at kde.org archserver at archserver.org amahi at amahi.org clam av at www.clamav.net freesbie at www.freesbie.org gnu at basemirror.de DragonFly BSD at reezer.heliohost.org wu-ftpd at wu-ftpd.org eclipse at www.eclipse.org php at powertrip.co.za pingo at www.camtp.uni-mb.si cs.uu.nl archive.cs.uu.nl go-parts
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 formatMirmon expects the probe to deliver a line starting with something like a timestamp :1189065601This is easy if the TIMESTAMP files on the mirrors contain just that. In the mirmon config file, the probe can be specified asprobe /usr/bin/wget -q -O - -t 1 %URL%TIMESTAMPIf however, the TIMESTAMP files are in a date-like formatThu Sep 6 08:00:01 UTC 2007the 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 sitesSuppose 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.
- parse the given url and determine the remote file:$remote = "rsync.apache.org::apache-dist/TIMESTAMP" ;
- invent the name for a local copy of the TIMESTAMP file$local = "/tmp/mirmon/rsync.apache.org__apache-dist" ;Note that several probes my be running in paralel, so you can't use a `fixed' name.
- retrieve the timestamp file :system "/local/bin/rsync $remote $local" ;
- output the content of file $local (if any)@ARGV = ($local) ; print <> ;