Custom report pages
AFA enables you to create custom pages in your reports.
Create a custom report page
You can create a custom report page that will be included as a separate tab in each new device, group, or matrix report.
Note: Only one custom report page is supported.
Note: The custom report page cannot be exported to HTML or PDF.
To create a custom report page:
-
Create an XML file called custom_report.xml, containing all of the execution commands in the following format:
<Custom_Report>
<Report name="report_name">
<device command="device_script_execution_command" output="device_output_file"></device>
<group command="group_script_execution_command" output="group_output_file"></group>
<matrix command="matrix_script_execution_command" output="group_output_file"></matrix>
</Report>
</Custom_Report>
For more details, see Custom report configuration file parameters.
The <device>, <group>, and <matrix> lines are optional. If you include the <device> line but do not include the <group> or <matrix> lines, the custom report page in the group or matrix report will display a concatenation of custom device pages.
-
Create a folder called custom_report, containing all of the scripts that must be executed.
-
Create a sub-folder called additional_files under the custom_report folder, containing additional files that are required for generating the custom report, for example data files, .css files, and so forth.
-
Add the file custom_report.xml and the folder custom_report (along with all its contents, including the subfolder additional_files) to a single .zip file.
-
Enter the following command:
extract_custom_report -f zip_ file [-d domain_number] [-u user_name]
Note: option -d was deprecated
For more details, see Extract custom report script flags.
The extract_custom_report script extracts the .zip file.
The next time a report is generated, it will include the custom page.
Note: If desired, you can disable the custom report page. For details, see the Use_Custom_Report parameter.
Custom report configuration file parameters
Parameter |
Description |
---|---|
report_name |
The name of the report page. |
device_script_execution_command |
The script execution command for the custom device report page, including input parameters. For example: sh device_script.sh |
device_output_file |
The name of the HTML output file for the custom device report page. For example: custom_device.html |
group_script_execution_command |
The script execution command for the custom group report page, including input parameters. For example: sh group_script.sh |
group_output_file |
The name of the HTML output file for the custom device report page. For example: custom_group.html |
matrix_script_execution_command |
The script execution command for the custom matrix report page, including input parameters. For example: sh matrix_script.sh |
matrix_output_file |
The name of the HTML output file for the custom device report page. For example: custom_matrix.html |