Add description how to setup apt update monitoring
[cacert-infradocs.git] / docs / systems.rst
1 Systems
2 =======
3
4 .. toctree::
5 :maxdepth: 1
6
7 systems/infra02
8 systems/arbitration
9 systems/blog
10 systems/board
11 systems/emailout
12 systems/monitor
13 systems/webmail
14
15 General
16 -------
17
18 .. todo:: consider whether a central MySQL service should be setup
19
20 Many containers contain their own instance of MySQL. It might be a better
21 idea to centralize the MySQL setups in a single container.
22
23 .. todo:: consider whether a central PostgreSQL service should be setup
24
25 .. todo::
26
27 setup a central syslog service and install syslog clients in each container
28
29 .. topic:: Setup package update monitoring for a new container
30
31 For Icinga to be able to check the update status of packages on you server
32 you need to install NRPE, a helper service. Install the necessary packages::
33
34 sudo aptitude install nagios-plugins-basic nagios-nrpe-server
35
36 Put :doc:`systems/monitor` on the list of allowed hosts to access the NRPE
37 service by adding the following line to :file:`/etc/nagios/nrpe_local.cfg`::
38
39 allowed_hosts=172.16.2.18
40
41 Tell the NRPE service that there is such a thing as the check_apt command by
42 creating the file :file:`/etc/nagios/nrpe.d/apt.cfg` with the following
43 contents::
44
45 # 'check_apt' command definition
46 command[check_apt]=/usr/lib/nagios/plugins/check_apt
47
48 # 'check_apt_distupgrade' command definition
49 command[check_apt_distupgrade]=/usr/lib/nagios/plugins/check_apt -d
50
51 Restart the NRPE service::
52
53 sudo service nagios-nrpe-server restart
54
55 Check that everything went well by going to https://monitor.cacert.org/,
56 going to the APT service on the host and clicking :guilabel:`"Re-schedule
57 the next check of this service"`. Make sure that :guilabel:`"Force Check"`
58 is checked and click :guilabel:`"Commit"`. Now you should see a page with a
59 green background. If not something went wrong, please contact the
60 :doc:`systems/monitor` administrators with the details.
61
62 That's it, now the package update status should be properly displayed in
63 Icinga.
64
65 .. todo:: think about replacing nrpe with Icinga2 satellites
66
67 Checklist
68 ---------
69
70 .. index::
71 single: etckeeper
72 single: nrpe
73
74 * All containers should be monitored by :doc:`systems/monitor` and should
75 therefore have :program:`nagios-nrpe-server` installed
76 * All containers should use :program:`etckeeper` to put their local setup into
77 version control. All local setup should use :file:`/etc` to make sure it is
78 handled by :program:`etckeeper`
79 * All infrastructure systems must send their mail via :doc:`systems/emailout`
80 * All infrastructure systems should have an system-admin@cacert.org alias to
81 reach their admins
82 * The installation of :index:`systemd-sysv` in containers can be blocked by
83 putting the following lines in :file:`/etc/apt/preferences.d/systemd-sysv`::
84
85 Package: systemd-sysv
86 Pin: release a=stable
87 Pin-Priority: -1
88
89 .. todo:: document how to setup the system-admin alias on the email system