FortiADC
FortiADC enhances the scalability, performance, and security of your applications whether they are hosted on premises or in the cloud.
scheehan_FTNT
Article Id 193926

Description
This article describes how to generate script log.



 
 
Log Reference:
https://docs.fortinet.com/document/fortiadc/6.0.1/log-reference/389338/0300010000-script

Log ID - 0300010000 (script).
This log ID relates to a script event involving error system load a script file.

Message:script log
Meaning: The system loaded a script.
Priority: information


Solution
1) Enable script log.



 
 
2) Create custom script (example).
 
 
 
 
When HTTP_REQUEST{
host = HTTP:header_get_value("Host")
log("HTTP Response loc is %s \n", host)
}


Brief Explanation.

- Line 1 HTTP_REQUEST for HTTP request event.
- Line 2 HTTP:header_get_value('Host') return HTTP Host header info.
- Line 3 log command print and generate log event entries to Log Browsing.

Refer to below guide for more information:
https://docs.fortinet.com/document/fortiadc/6.0.0/script-reference-guide/944930/http-commands

3) Assign script to SLB virtual server.
 
 

 
 
Browse the site for verification.
 
 





Contributors