Table of Contents
This chapter explains how to customize the reports generated by Lire. Each superservice comes with a number of subreports which select various information from the log file for inclusion in the final report.
The report's configuration for a specific superservice is in a file named superservice.cfg. This file is looked for in $sysconfdir/lire and $HOME/.lire/etc/. If you're not happy with the default configuration as shipped with Lire, you're advised to copy $sysconfdir/lire/superservice.cfg to $HOME/.lire/etc/ and edit this copy. This copy will of course not get touched on Lire upgrades.
The configuration file is line oriented. Empty lines are ignored as well as line starting with #. The configuration file is divided in sections introduced by lines starting with the directive =section. The section's title follows the directive.
Each section can optionally contain a list of filters that will be used to filter the records used to generate the subreports. A filter is set up by starting a line with the pipe (|) character followed by the filter's id. The rest of the line will usually contain filter's parameter assignments. If any filters is used in the section, they must come after the section's title and before the subreports.
Other lines are interpreted as subreport id's.
Example 5.1. Commented Report Configuration File
Here is an example configuration for the DNS superservice.
=section All Requests top-requesting-hosts hosts_to_show=10 top-requested-names names_to_show=10 requesttype-distribution requests-by-period period=1d =section Recursive Requests |select-resolver method="recurs" top-requesting-hosts hosts_to_show=10 top-requested-names names_to_show=10 requesttype-distribution requests-by-period period=1d =section Non Recursive Requests |select-resolver method="nonrec" top-requesting-hosts hosts_to_show=10 top-requested-names names_to_show=10 requesttype-distribution requests-by-period period=1d
This DNS report will contain three sections. The first section “All Requests” doesn't use any filters and thus the four configured subreports (top-requesting-hosts, top-requested-names, requesttype-distribution and requests-by-period) will be computed using all the requests. The second section (“Recursive Requests”) has one filter set up (select-resolver) which will select only recursive requests. This section will contain the same subreports as the “All Requests” section, but calculated on a different input set. The third section (“Non Recursive Requests”) is similar to the second section with the exception that only non-recursive requests will be used to compute the subreports.