| Description |
This articles discusses about the troubleshooting command use to verify the SQL query for the FortiGate Local Report. |
| Scope | |
| Solution |
In FortiGate CLI/SSH session, run the following commands:
# diagnose debug disable # diagnose debug reset # diagnose debug application reportd -1 # diagnose debug enable
From GUI.
Go to Log & Report -> Local Reports -> Generate Now.
From CLI.
# execute report run
Sample log as below:
Generating report for layout: default... Request to generate a report is successfully sent to reportd. [754] __handle_cron_message-Cron message. type=2, vd=root # [51] rptengine_create_report_dir- Report directory: /var/log/root/report/generated/On-Demand-default-2021-10-21-160253 is created successfully [861] _handle_chart_item-Process chart item: id=311, chart=traffic.bandwidth.history_c
sql="select timestamp, sum(sentbyte)*8/3600 sentbyte, sum(rcvdbyte)*8/3600 rcvdbyte, sum(sentbyte + rcvdbyte)*8/3600 bandwidth from grp_traffic_summary where timestamp BETWEEN 1634716800 and 1634803199 and 1=1 group by timestamp order by timestamp" num of periods:24 Current time: 1634803373 1634716800, 24, 3600 [861] _handle_chart_item-Process chart item: id=321, chart=traffic.sessions.history_c
sql="select timestamp, sum(sessioncount) sessions from grp_traffic_summary where timestamp BETWEEN 1634716800 and 1634803199 and 1=1 group by timestamp order by timestamp" num of periods:24 Current time: 1634803373 1634716800, 24, 3600 [861] _handle_chart_item-Process chart item: id=331, chart=traffic.statistics
Refer to the above SQL query for the report time range, calculation, current report time, order, grouping and number of lines show in the report.
To stop the debug:
# diagnose debug disable # diagnose debug reset
For more detail of FortiGate Local Report:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.