Technical Note: Debugging system scripting in FortiADC
Description
Solution
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:
Log into the CLI of the FortiADC in order to see these logs:
The scripting is mainly used as direct traffic according to anything related to http request or response, such as content routing.
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 enableAs the script is executed the text will appear on the terminal.
#diag debug application haproxy scripting set
The scripting is mainly used as direct traffic according to anything related to http request or response, such as content routing.
