Forum Discussion
wsanders_233261
Nimbostratus
Sep 18, 2017Can't get ltm policy to log
I have the following policy:
modify policy httptohttps-POLICY {
controls { forwarding }
requires { http }
rules replace-all-with {
httptohttpsRULE {
actions replace-all-with {
0 {
http-reply
redirect
location "https://[getfield [HTTP::host] \":\" 1][HTTP::uri]"
}
1 {
log
write
message "REDIRECTED: https://[getfield [HTTP::host] \":\" 1][HTTP::uri]"
}
}
ordinal 1
}
}
strategy first-match
}
It doesn't seem to log anything. This is tmsh 11.6. How do I get logging to work? How can I get it to log to local0.debug?
- crodriguezRet. Employee
Change the log message itself to include "tcl:" in front of the rest of the string. In other words, in order to do command substitution for the getfield, HTTP::host, and HTTP::uri commands, you need to indicate that this is a tcl string. Something like this:
tcl:REDIRECTED: https://[getfield [HTTP::host] \":\" 1][HTTP::uri]
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