4.13. Evaluation of data from the LDAP directory with Univention Directory Reports#

Univention Directory Reports offers the possibility of creating predefined reports for any objects to be managed in the directory service.

The structure of the reports is defined using templates. The specification language developed for this purpose allows the use of wildcards, which can be replaced with values from the LDAP directory. Any number of report templates can be created. This allows users to select very detailed reports or just create simple address lists, for example.

The creation of the reports is directly integrated in the UMC modules Users, Groups and Computers. Alternatively, the command line program univention-directory-reports can be used.

Six report templates are already provided with the delivered Univention Directory Reports, which can be used for users, groups and computers. Three templates create PDF documents and three CSV files, which can be used as an import source for other programs. Further templates can be created and registered.

4.13.1. Creating reports via Univention Management Console modules#

To create a report, you need to open the UMC module Users, Groups or Computers. Then all the objects which should be covered by the report must be selected (you can select all objects by clicking the checkbox the left of Name). Clicking on More ‣ Create report allows to choose between the Standard Report in PDF format and the Standard CSV Report in CSV format.

Creating a report

Fig. 4.10 Creating a report#

The reports created via a UMC module are stored for 12 hours and then deleted by a cron job. The settings for when the cron job should run and how long the reports should be stored for can be defined via two Univention Configuration Registry variables:

directory/reports/cleanup/cron#

Defines when the cron job should be run.

directory/reports/cleanup/age#

Defines the maximum age of a report document in seconds before it is deleted.

4.13.2. Creating reports on the command line#

Reports can also be created via the command line with the univention-directory-reports program. Information on the use of the program can be viewed using the --help option.

The following command can be used to list the report templates available to users, for example:

$ univention-directory-reports -m users/user -l

4.13.3. Adjustment/expansion of Univention Directory Reports#

Existing reports can be created directly with the presettings. Some presettings can be adapted using Univention Configuration Registry. For example, it is possible to replace the logo that appears in the header of each page of a PDF report. To do so, the value of the Univention Configuration Registry Variable directory/reports/logo can include the name of an image file. The usual image formats such as JPEG, PNG and GIF can be used. The image is automatically adapted to a fixed width of 5.0 cm.

In addition to the logo, the contents of the report can also be adapted by defining new report templates.