Chapter 13 Logging and Reporting : Logging and reporting overview : Reports : How to create a FortiOS report
  
How to create a FortiOS report
This creates a FortiOS report from within the CLI. This is not modifying a default report, rather, it is creating one from scratch. This can take quite a while since there is a lot of commands to use. This is a time-consuming activity, so it is recommended that you allow yourself plenty of time to configure a FortiOS report. To see some sample configuration, view “Customizing FortiOS reports with CLI”.
1. Log in to the CLI and, using the config report style command, configure the styles for the footer and header, page, cover page, charts, table of contents, and page headings.
It is recommended that you outline what you will be doing first, before configuring a report from scratch. When configuring new charts, you must also configure datasets. Charts will not be saved if a dataset is not associated with the chart. When configuring datasets, you must know SQL language.
2. Configure the theme using the config report theme command.
A theme applies the styles that you configured previously in step 1.
3. Configure the new datasets that you want to have for the new charts using the config report dataset command.
A dataset contains the information the FortiGate unit needs to gather the information for a chart. The log database is an SQL database, and that is why the datasets must be written in SQL; specifically, the log database uses SQLite so you must make sure that the information is correct in a dataset. If the information is not correct, the FortiGate unit will not gather the proper information for that chart.
4. Configure the new charts that you want and make sure to apply the correct dataset with the chart using the config report chart command.
5. Configure the report layout using the config report layout command.
The layout puts all the pieces of the report together. The layout provides a template for the FortiGate unit to know how the pieces should be put together and where they need to be on the pages of the report. The layout also allows for specifying when the report will be generated, and what style will be applied.
6. Test the report by going back to the report layout and setting the time so that the report immediately generates; it will then appear in the list of reports in the web‑based manager.