This tool extracts variables from LogWatch reports so that you can visualize tendencies and detect or prevent errors on your servers. It generates a file for each variable and server in an easily parseable format, and usable by other tools like gnuplot.
Currently it extracts the following variables:
Download the tarball from the files section, extract and compile it. It doesn't depend on other libraries, but you'll need a C++ compiler. After a successful compilation, you can run make install as root to install it systemwise.
$ tar xzvf logparser.tar.gz
$ cd logparser
$ make
# make install
The tool uses a simple command line interface with the sintax:
$ logparser <logwatch mails dir> <output dir>
The first directory must contain the mails sent by LogWatch with the reports. I can't read from IMAP or other servers, just from local files. We recommend the use of the tool offlineimap to store and manage them.
The results will be stored in the specified output dir. Each file will be named with the format: <variable-name>_<server-name>_<subvariable-name>.txt. The subvariables depend on the kind of variable. For example, with the disk space usage variable, the subvariables will be each partition.
The result files contain one value per line, with the date and the value, separated by a tab. The date is in the ISO format: year-month-day (ex.: 2013-09-10). The values are not ordered by date. You may want to order them using the sort unix command.
gnuplot> set xdata time
gnuplot> set timefmt "%Y-%m-%d"
gnuplot> plot 'Disk-space-percentage_my-server_-home.txt' using 1:2