Codebase list metche / dc1d61e
Work on README and manpage (Addresses: #23) Lunar 18 years ago
2 changed file(s) with 72 addition(s) and 61 deletion(s). Raw diff Collapse all Expand all
2525 periodically :
2626 - saves the "system state" to $BACKUP_DIR, i.e. :
2727 . $WATCHED_DIR (default: /etc)
28 . $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
28 . $CHANGELOG_FILE (default /root/Changelog)
29 or $CHANGELOG_DIR/*/Changelog (default: /root/changelogs/*/Changelog)
2930 . Debian packages states and versions (using apt-show-versions)
3031 - sends you, in a nicely formated email, the "system state" changes ; see
3132 https://poivron.org/dev/metche/ for an example.
5556 3. bzip2
5657 4. If you want metche to encrypt the email it sends you : gnupg
5758 5. If you want metche to monitor your vservers as well : util-vserver tools
58 6. If you want metche to monitor your Changelog files, at least one Changelog
59 file must be located in $CHANGELOG_DIR/*/Changelog ; for example, you
60 can have :
61 /root/
62 changelogs/
63 common/Changelog
64 apache/Changelog
65 postfix/Changelog
59 6a. If you want metche to monitor one manually written Changelog file,
60 it must be located at $CHANGELOG_FILE.
61 6b. If you want metche to monitor multiple manually written Changelog
62 files, they must be located in $CHANGELOG_DIR/*/Changelog ;
63 for example, you can have :
64 /root/
65 changelogs/
66 common/Changelog
67 apache/Changelog
68 postfix/Changelog
6669
6770 ,-------------------------------------------------------------------------------
6871 | INSTALLATION
111114 | FAQ
112115 `-------------------------------------------------------------------------------
113116
114 1. How are the monitored Changelog files ($CHANGELOG_DIR/*/Changelog)
115 generated ?
117 1. How are the monitored Changelog files ($CHANGELOG_FILE or
118 $CHANGELOG_DIR/*/Changelog) generated ?
116119
117120 With Emacs or Vim. Ah ah. They are written by *you* ! They are an important
118121 part of the collective sysadmin process metche is supposed to facilitate.
126129 report is emailed to you.
127130
128131 A similar mechanism to automatically turn a "testing state" into a "stable"
129 one ; see metche(8) for the algorithm.
132 one ; see metche(8) for explainations.
130133
131134 3. How do I see the saved states list ?
132135
3636 <refsect1 id="description">
3737
3838 <title>DESCRIPTION</title>
39 <Para>metche is a tool meant to facilitate collective sysadmin, by
40 monitoring changes in the system configuration. At least
41 <envar>WATCHED_DIR</envar> (default: <filename>/etc</filename>) is
42 monitored ; optionally, metche can also monitor :</Para>
39
40 <Para>metche is a tool meant to facilitate collective sysadmin by
41 monitoring changes in the system configuration.</Para>
42
43 <Para>At least, metche monitors one directory, usually
44 <filename>/etc</filename> ; optionally, metche can also
45 monitor:</Para>
4346 <ItemizedList>
4447 <ListItem>
45 <Para>system Changelog files located in <filename><envar>CHANGELOG_DIR</envar>/*/Changelog</filename> (default:
46 <filename>/root/changelogs/*/Changelog</filename>)</Para>
48 <Para>one ore more user maintained changelog files,
4749 </ListItem>
4850 <ListItem>
49 <Para>Debian packages states and versions</Para>
51 <Para>Debian packages states and versions.</Para>
5052 </ListItem>
5153 </ItemizedList>
5254
55 <Para>metche should be installed with a cronjob regularly running to
56 automatically save the system state as needed. These states are saved in a
57 way looking like the Debian development model:</Para>
58 <ItemizedList>
59 <ListItem>
60 <Para><emphasis>unstable</emphasis> states are saved as soon as
61 a change is detected. They are kept until a new
62 <emphasis>testing</emphasis> state appears.</Para>
63 </ListItem>
64 <ListItem>
65 <Para><emphasis>testing</emphasis> states is created from the last
66 <emphasis>unstable</emphasis> state that has not been changed
67 after a short amount of time (by default, one hour). Old
68 <emphasis>unstable</emphasis> states are deleted afterwards.</Para>
69 </ListItem>
70 <ListItem>
71 <Para><emphasis>stable</emphasis> states are created from the last
72 <emphasis>testing</emphasis> state, either manually, or after a
73 long amount of time (by default, 3 days). Old <emphasis
74 >testing</emphasis> states are deleted afterwards.</Para>
75 </ListItem>
76 </ItemizedList>
77
78 <Para>When a new <emphasis>testing</emphasis> state is saved, an email is
79 sent to a configurable address, giving an overwiew of
80 the differences with the previous <emphasis>testing</emphasis>.
81 A notification is also sent when a new <emphasis>stable</emphasis> state is
82 saved.</Para>
83
84 <!-- XXX: add a CONFIGURATION section -->
5385 <Para><envar>WATCHED_DIR</envar> and <envar>CHANGELOG_DIR</envar> options
5486 can me customized in metche's configuration file, as well as a few other
5587 ones.</Para>
88
89 </refsect1>
90 <refsect1 id="options">
91
92 <title>OPTIONS</title>
5693
5794 <Para>If <command>-h</command> <emphasis>HOST</emphasis> is specified,
5895 <filename>/etc/metche/HOST.conf</filename> is used instead of
6097 <envar>VSERVER_EXEC_PREFIX</envar> option, allows to monitor several
6198 vservers running on a system.</Para>
6299
63 <Para>Anyway, one of the following commands has to be specified on the
64 command line :</Para>
100 <Para>One of the following commands must be specified on the
101 command line:</Para>
65102
66103 <VariableList>
67104
83120 <VarListEntry><Term><command>stabilize</command></Term>
84121 <ListItem>
85122 <Para>When run with the <command>stabilize</command> command, metche
86 turns the given "testing state", if specified, or the latest one,
87 otherwise, into a "stable state".</Para>
123 turns a "testing state" into a "stable state". By default, it will
124 use the last "testing state", but this can be overriden by giving
125 a specific state as argument.</Para>
88126 </ListItem>
89127
90128 <VarListEntry><Term><command>cron</command></Term>
91129 <ListItem>
92 <Para>When run (usually by a cronjob) with the <command>cron</command> command, metche :
93 <ItemizedList>
94 <ListItem>
95 <Para>saves a "unstable", "testing", "stable" state, or none, as
96 needed ;</Para>
97 </ListItem>
98 <ListItem>
99 <Para>sends you a report if needed (see <ulink
100 url="https://poivron.org/dev/metche/">metche's homepage</ulink>
101 for an example) ;</Para>
102 </ListItem>
103 </ItemizedList>
104 The following algorithm is used to decide exactly what to do :
105 <screen>
106 if (no change happened for TESTING_TIME) then
107 if (something has changed since the last testing) then
108 send a report against last testing
109 save a new testing state
110 delete all saved unstable states
111 elif (no change happened for STABLE_TIME) then
112 if (something has changed since the last stable) then
113 save a new stable state and notify EMAIL_ADDRESS
114 delete all saved testing states older than STABLE_TIME
115 fi
116 fi
117 elif (last unstable exists) then
118 if (something has changed since the last unstable) then
119 save a new unstable state
120 fi
121 else
122 save a new unstable state
123 fi
124 </screen>
125 </Para>
130 <Para>This command should not be called manually, but used from
131 a cronjob. When called, it can perform various operations like:
132 saving "unstable", "testing" or "stable" states as needed and
133 sending reports and notification if configured to do so.</Para>
126134 </ListItem>
127135
128136 </VariableList>
163171
164172 <refsect1 id="bugs"><title>BUGS</title>
165173 <Para>See <ulink url="https://poivron.org/dev/metche/">metche's ticket
166 system</ulink> to see the bugs, missing features, and development
167 road-map.</Para>
174 system</ulink> to see the bugs, missing features, and development
175 road-map.</Para>
168176 </refsect1>
169177
170178 <refsect1 id="author"><title>AUTHOR</title>
171 <Para>This manual page was written by Ben Voui
172 <email>intrigeri@boum.org</email>.</Para>
179 <Para>This manual page was written by the boum collective
180 <email>boum@anargeek.net</email>.</Para>
173181 </refsect1>
174182
175183 </RefEntry>