Codebase list metche / 65b7183
65b7183

Tree @65b7183 (Download .tar.gz)

metche - reducing root bus factor
homepage : https://poivron.org/dev/metche/

,-------------------------------------------------------------------------------
| Copyright (C) 2004-2005 boum.org collective - property is theft !
`-------------------------------------------------------------------------------

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.

,-------------------------------------------------------------------------------
| OVERVIEW
`-------------------------------------------------------------------------------

metche is a tool meant to facilitate collective sysadmin ; basically, it
periodically :
   - saves the "system state" to $BACKUP_DIR, i.e. :
      . $WATCHED_DIR (default: /etc)
      . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
      . Debian packages states and versions (using apt-show-versions)
   - sends you, in a nicely formated email, the "system state" changes ; see
     https://poivron.org/dev/metche/ for an example.

,-------------------------------------------------------------------------------
| BASIC USAGE
`-------------------------------------------------------------------------------

When installed and configured, metche is run by cron, and you just have to read
the report emails. Of course, it's not useful at all if you don't :
   - set $EMAIL_ADDRESS config variable to your sysadmin collective mailing-list
     address ;
   - use the Changelog files in a rigorous way.

Note: it is dangerous to use metche without before reading the SECURITY section
of the manpage.

For a deeper explanation of the way metche works, read the manpage.

,-------------------------------------------------------------------------------
| REQUIREMENTS
`-------------------------------------------------------------------------------

1. Debian GNU/Linux and apt-show-versions (if Debian packages monitoring is
   enabled)
2. mutt
3. If you want metche to monitor your vservers as well : util-vserver tools
4. If you want metche to monitor your Changelog files, at least one Changelog
   file must be located in $CHANGELOG_DIR/*/Changelog ; for example, you
   can have :
     /root/
         changelogs/
             common/Changelog
             apache/Changelog
             postfix/Changelog

,-------------------------------------------------------------------------------
| INSTALLATION
`-------------------------------------------------------------------------------

See the included INSTALL file.

,-------------------------------------------------------------------------------
| CONFIGURATION
`-------------------------------------------------------------------------------

*** Without vservers support

1. Copy metche.conf.default to /etc/metche.conf and edit it so that it suits
   your needs.
2. Read the next sections of this document and the manpage.
3. Add to /etc/cron.d/metche something like :
     0-59/5 * * * * root test -x /usr/local/sbin/metche && \
      /usr/local/sbin/metche cron

*** With vservers support

You need one config file per system to be monitored (usually one for the host
system, and one per vserver). The "-h <host>" command-line option makes metche
use /etc/metche/<host>.conf config file instead of /etc/metche.conf.

1. mkdir /etc/metche
2. For each system to monitor, follow the next steps (replacing <host> by this
   host's name) :
     - copy metche.conf.default to /etc/metche/<host>.conf
     - edit <host>.conf so that it suits your needs
     - if the system to monitor is a vserver, edit <host>.conf to set
       VSERVER_EXEC_PREFIX to something like "/usr/sbin/vserver <host> exec"
3. Read the next sections of this document and the manpage.
4. For each system to monitor, add to /etc/cron.d/metche something like :
     0-59/5 * * * * root test -x /usr/local/sbin/metche && \
       /usr/local/sbin/metche -h <host> cron

,-------------------------------------------------------------------------------
| SECURITY : BIG FAT WARNING
`-------------------------------------------------------------------------------

Read the SECURITY section of metche(8). Really.

,-------------------------------------------------------------------------------
| FAQ
`-------------------------------------------------------------------------------

1. Hey, how is metche working, and what are the underlying concepts I have to
   know ?

   When called with the "cron" command line switch, metche looks if the "system
   state" has changed in the last $TESTING_TIME minutes. If it is the case, a
   "unstable state" is saved. Otherwise, a "testing state" is saved, and a
   report is emailed to you.

2. What do we call a "milestone" ?

   It's a saved "testing state".

3. How to view the saved states list ?

   Run "metche [-h <host>] list".
   If '-h <host>' option is specified, /etc/metche/<host>.conf will be used.

4. I've broken my system, how can I see a report against a given, known working,
   milestone ?

   Run "metche [-h <host>] report [milestone]".
   If no milestone is specified, the latest "testing state" is used as
   reference. 
   If '-h <host>' option is specified, /etc/metche/<host>.conf will be used.

5. I've seen "testing" and "unstable" states, what about "stable" ones ?

   A mechanism to define a "stable state" has still to be found.

Commit History @65b7183f95282dc01b5c78464feee52fb63e3b2f