Forum Discussion
oogabooga_13071
Oct 12, 2016Altocumulus
LTM Policy Logging variables pre 12.0
Hi Guys, Does anyone know if it is possible to log dynamic variables (e.g. [HTTP::uri]) within a LTM policy code pre 12.x (on v11.6.1)? I read the following from here Version 11.X:
Request ...
- Oct 13, 2016
Hi Guys,
It turns out dynamic variables are only available on v12.x and it is not possible on v11.x
Here is the excerpt form F5... The feature you are trying to use is called "TCL command substitution" and is supported only in v12.x
Manual Chapter: Local Traffic Policies https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-basics-12-0-0/7.html In versions prior to v12.x you cannot use TCL variables in the log messages (only static text) - iRules have to be used to log TCL variables in this case. In v12.x you can use the syntax below to log TCL variables such as "HTTP::uri": ltm policy /Common/Drafts/lab-test-policy-v1.1 { last-modified 2016-10-12:13:12:16 published-copy /Common/lab-test-policy-v1.1 requires { http } rules { log { actions { 0 { log write message "tcl: This is the current URI: [HTTP::uri]" } } } } strategy /Common/first-match }
oogabooga_13071
Oct 13, 2016Altocumulus
Hi Guys,
It turns out dynamic variables are only available on v12.x and it is not possible on v11.x
Here is the excerpt form F5... The feature you are trying to use is called "TCL command substitution" and is supported only in v12.x
Manual Chapter: Local Traffic Policies
https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-basics-12-0-0/7.html
In versions prior to v12.x you cannot use TCL variables in the log messages (only static text) - iRules have to be used to log TCL variables in this case.
In v12.x you can use the syntax below to log TCL variables such as "HTTP::uri":
ltm policy /Common/Drafts/lab-test-policy-v1.1 {
last-modified 2016-10-12:13:12:16
published-copy /Common/lab-test-policy-v1.1
requires { http }
rules {
log {
actions {
0 {
log
write
message "tcl: This is the current URI: [HTTP::uri]"
}
}
}
}
strategy /Common/first-match
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects