FortiADC
FortiADC enhances the scalability, performance, and security of your applications whether they are hosted on premises or in the cloud.
goliver
Staff
Staff
Article Id 197195
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.   

Contributors