Skip to main content
goliver
Staff
Staff
Aug 16, 2016 10:25 AM UTC

Technical Note: Debugging system scripting in FortiADC

  • Apr 24, 2026 11:59 AM UTC
  • 0 replies
  • 2054 views
  • Translate All
Description
This article provides an explanation on how to debug and find problems that are occurring in the scripting engine of the FortiADC.

Solution
There are several pre-defined scripts delivered with the FortiADC, these examples are documented and the explanation of the features are explained in the Appendix C of the FortiADC Handbook.

In the examples there is a use of the debug() command which has a printf format:
debug("uri %s matches sports|news|government\n", uri);
This command enables the printing of variables and text in the log so as to understand the flow of the code and decisions made by operators.

Log into the CLI of the FortiADC in order to see these logs:
#diag debug enable
#diag debug application haproxy scripting set
As the script is executed the text will appear on the terminal.

The scripting is mainly used as direct traffic according to anything related to http request or response, such as content routing.   

Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024