- HTML Admin-Manual
- PDF Admin-Manual
- HTML ITSM-Manual
- PDF ITSM-Manual
- HTML Developer-Manual
- PDF Developer-Manual
- HTML Developer-API
Generally, no system administrator is needed for the operation, configuration and maintenance of the statistics module. However, a little background information for the system administrator is given at this point.
File paths refer to subdirectories of the OTRS home directory (in most cases
All report configurations are implemented and administrated in XML, and therefore stored in the database table "xml_storage". Other modules whose content is presented in xml format use this table as well.
The following files are necessary for the stats module to work accurately:
Whether the results of a statistic are to be cached or not can be setup in the configuration. Cached report results are stored as files in the
var/tmpdirectory of the OTRS installation (in most cases
Cached stats can be recognized by the "Stats" prefix.
If the data is lost, no major damage is caused. The next time the report is called up, the stats module will not find the file any more and so will generate a new report. Of course this will probably take a little longer to run.
This file is saved in the
bindirectory. It facilitates the generation of report in the command line.
As an example, see the command line call in Script 19.1.
bin> perl otrs.GenerateStats.pl -n 10004 -o /output/dir
Script 19.1. Generating a report from the command line.
A report from the stat configuration "Stat# 10004" is generated and saved as csv in the
The generated report can also be sent as an e-mail. More information can be called up with the command in Script 19.2.
bin> perl otrs.GenerateStats.pl --help
Script 19.2. Getting information about the otrs.GenerateStats.pl file.
It usually does not make sense to generate reports manually via the command line, as the stats module has a convenient graphical user interface. However, generating reports manually does make sense when combined with a Cronjob.
Imagine the following scenario: On the first day of every month, the heads of department want to receive a report for the past month. By combining a cronjob and command line call the reports can be sent to them automatically by e-mail.
The stats module facilitates the generation of static statistics. For every static stat a file exists in which its content is precisely defined.
This way, very complex stats can be generated. The disadvantage is that they are not particularly flexible.
The files are saved in the directory
Prior OTRS versions 1.3 and 2.0 already facilitated the generation of stats / reports. Various reports for OTRS versions 1.3 and 2.0 which have been specially developed to meet customers' requirements can be used in recent OTRS versions too.
The files must merely be moved from the
Kernel/System/Stats/ path to
Kernel/System/Stats/Static/. Additionally the package name of the respective script must be amended by "::Static".
The following example shows how the first path is amended.
"It is not always necessary to reinvent the wheel..."
The stats module provides various default reports. Reports which are of interest for all OTRS users will in future be added to the default reports set of the stats module package. Default reports are saved in the stats module xml format in the