swatch (Simple Log Analyzer) is a perl program that can run as a daemon and continuously analyze log files for certain patterns to appear and then trigger an email notification. This program is also known as swatchdog.
swatch can be installed with the Pakfire web interface or via the console:
pakfire install swatch
There is no web interface for this Addon. To run this Addon open the client console or terminal and access the IPFire box via SSH.
Furthermore you need a configuration file that tells swatch for which patterns it should look out and which action to trigger.
The config is
Sending email notification on the word "error", would look like this:
watchfor /error/ echo=normal email@example.com,subject="error found"
Then tell swatchdog to start in daemon mode. Swatch will monitor the
/usr/bin/swatchdog --daemon -c /etc/swatch/swatchdogrc -t /var/log/messages
To start this automatically at system startup, best put it in:
Despite being named "simple" is a very powerful tool that can be used for all sorts of neat stuff.