Forum Discussion
viziony
Cirrus
Dec 07, 2022iRule Help on Logging the cookie parameter's value.
Hello There -- Would like to get your assistance on logging from an iRule. I would like the irule to log to the LTM logs to see if the connection is sending over the cookie parameter's value ...
Kai_Wilke
MVP
Dec 07, 2022Hi viziony,
check out the modified iRule below...
when HTTP_REQUEST {
if { [HTTP::header value "Route-to-AB"] equals "YES" } then {
pool pool-A
log local0.info "Header \"Route-to-AB\" value is \"YES\"."
} else {
pool pool-B
log local0.info "Header \"Route-to-AB\" value is \"[HTTP::header value "Route-to-AB"]\"."
}
}
Note: You may change the log-level "info" to "debug" if subsequent messages getting supressed. LTM has a filter for non debug messages.
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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