metche - reducing root bus factor
homepage : https://poivron.org/dev/metche/
,-------------------------------------------------------------------------------
| Copyright (C) 2004-2006 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 (default /var/lib/metche), i.e. :
. $WATCHED_DIR (default: /etc)
. $CHANGELOG_FILE (default /root/Changelog)
or $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
. Debian packages states and versions (using apt-show-versions)
- sends you, in a nicely formated email, the last changes to the "system
state"; see https://poivron.org/dev/metche/ for an example.
,-------------------------------------------------------------------------------
| BASIC USAGE
`-------------------------------------------------------------------------------
When installed and configured, metche is run by a cronjob, 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 metche(8) manpage.
,-------------------------------------------------------------------------------
| REQUIREMENTS
`-------------------------------------------------------------------------------
* Debian GNU/Linux and apt-show-versions (if Debian packages monitoring is
enabled)
* mutt
* bzip2
* If you want metche to encrypt the email it sends you : gnupg
* If you want metche to monitor your vservers as well : util-vserver tools
* If you want metche to monitor one manually written Changelog file,
it must be located at $CHANGELOG_FILE.
_or_ If you want metche to monitor multiple manually written Changelog
files, they 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
`-------------------------------------------------------------------------------
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 metche(8) 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
,-------------------------------------------------------------------------------
| SECURITY : BIG FAT WARNING
`-------------------------------------------------------------------------------
Read the SECURITY section of metche(8). Really.
,-------------------------------------------------------------------------------
| FAQ
`-------------------------------------------------------------------------------
1. How are the monitored Changelog files ($CHANGELOG_FILE or
$CHANGELOG_DIR/*/Changelog) generated ?
With Emacs or Vim. Ah ah. They are written by *you* ! They are an important
part of the collective sysadmin process metche is supposed to facilitate.
2. 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.
A similar mechanism to automatically turn a "testing" state into a "stable"
one ; see metche(8) for explainations.
3. How do I see the saved states list ?
Run "metche list".
4. I've broken my system, how can I see a report against a previous, known
working, system state ?
Run "metche report [{stable,testing,unstable}-YYYYMMDDHHMM]".
If no saved state is specified, the latest "testing state" is used as
reference.
5. How do I create a "stable state" by hand ?
Run "metche stabilize [testing-YYYYMMDDHHMM]".
This turns the given testing state, if specified, or the latest one,
otherwise, into a "stable state".