Introduction
This page describes how to set up various small system checks. It is not expected to be of much use to anyone except Alexis.
Psrf
- Create a non-root user to run some checks:
useradd --system --user-group --create-home --shell /bin/bash monitor
- Ensure that mail sent to this user on the monitoring system gets to a human. For myself, this means, on mandala, add an entry to /etc/aliases:
monitor: alexis
- Psrf is a framework for performing small checks. Install it as root as follows:
svn co https://svn.pasta.freemyip.com/main/psrf/trunk /usr/local/opt/psrf ln -sr /usr/local/opt/psrf/bin/psrf /usr/local/bin echo '* * * * * /usr/local/bin/psrf' | su - monitor -c 'crontab -'
(Hopefully, in the future, that last command won’t be needed.)
- As the ‘monitor’ user, edit the psrf configuration by running:
psrf -e
and add the following entry:
reg "Self-Test/Random" null '* * * * *' 'echo $RANDOM'
- Wait to see that working correctly (i.e. mails arrive) and then add other checks.
- The checks that the monitor user runs may rely on other software being installed. For myself, this means:
- For cert-monitor, run:
cd /tmp wget https://svn.pasta.freemyip.com/main/smalltools/trunk/bin/svn-cache-passwd chmod 755 svn-cache-passwd /tmp/svn-cache-passwd https://svn.pasta.freemyip.com/private/
- For the broken links scanner, run:
apt -y install linkchecker
- For cert-monitor, run: