Table of Contents
This chapter discusses various ways to configure Lire for generating periodical reports from your system logs.
The easiest way to have Lire generate reports from the various log files available on your system is through a cron job. Lire includes a script called lr_cron which takes care of calling the appropriate batch of commands on the appropriate log files. The reports are generated in the ASCII format and are sent to an email address of your choice. To use lr_cron, you are advised to configure Lire using lr_config.
When running lr_config, it will first ask questions about the global configuration of Lire and specific question for when you run a responder. After that, it will ask questions to configure the cronjob.
First, you will have the possibility to set default values that will be used for each service. You will also get the chance to override those defaults on a per-service case. Those parameters are: the email address that will receive the report and a string that will appear in the subject of the email.
All further questions ask you about which services you want Lire to report about. The first question for each superservice is always whether you are collecting log files related to this superservice. If you answer "no", it will skip further questions about this superservice.
The configuration program will then ask you questions about which services are run one-by-one. For email, for example, these services might be exim, postfix, qmail and sendmail. For each program lr_config asks you where lire can find the log files. It will also ask you about a filter that should be run on the log file before processing it. This way, it can process compressed log files or can only keep the relevant lines for a particular service. For these cases, you would use zcat or grep as filters.
Finally, you will have to enter the log files that are to be processed, either on a daily or weekly basis.
Installing the cron job is really easy: lr_config will give you the appropriate lines to add to you cron job. The lines to add to your crontab should look similar to:
0 10 * * * /usr/local/bin/lr_cron daily 0 10 * * 0 /usr/local/bin/lr_cron weekly
Once activated like this, report(s) will be sent on a weekly and/or daily basis.