Setting Up Logwitch
Download the archive from sourceforge and decompress it somewhere such as /usr/local/logwitch. Everything should be root:root owned and logwitch.lua and also probably logwitch.sh must be executable. The logwitch.sh file is an example cron script to call logwitch.lua so it makes sense maybe to move it to /usr/local/bin or /etc/cron.daily
You will need to have a version of the lua language installed and depending on where that is on the file system, you may need to edit the first line of logwitch.lua to suit. You will certainly want to edit the logwitch.sh file to meet your requirements. What to do there is documented within the file, but as an examplle you could add a shell command to check RAID status. Apart from calling logwitch.lua with the -cron switch to monitor your log4j and unix/linux logs, logwitch.sh is used to add other information to a daily report of your server's performance. When logwitch is used in this way a logwitch was here tag is written to the end of the first log in each series, so that current information is never repeated unless you use the -grep switch. Any .gz logs are decompressed and recompressed after they have been checked.
The main part of the set up is done by adding lua modules to the same directory as logwitch.lua. There is no need for them to be specified in any config file as logwitch will look for them and work with what it finds. There are some examples in the modules directory; these files, when moved to the program's home directory containing logwitch.lua, are effectively the configuration. You do not need to be a lua expert; configuration is not at all difficult and it can be best understood by looking at a simple example and considering how it could be used as a template. The comments in the auth.lua module should be carefully read, but let's consider what's left in this configuration to check the auth logs if we remove these comments - not so much!