Forum Discussion
jaddessi_207433
Nimbostratus
Aug 27, 2015Store data in variable from HTTP_REQUEST to LB_FAILED
Hi,
I am wondering, is it OK to set a variable in HTTP_REQUEST and then read it later in LB_FAILED? My purpose is to store the name of a failover pool, just in case LB_FAILED occurs with the prim...
Kevin_Stewart
Employee
Aug 31, 2015Understand that variables exists through the life of a single TCP connection. You can have many HTTP requests within a single TCP connection, and indeed you can have many HTTP requests before an LB_FAILED event happens. If you throw some logging in the HTTP request and LB_FAILED event to show what's happening and when, you may find that the variable is being set (incorrectly) by subsequent HTTP requests before the failing event happens.
when HTTP_REQUEST {
... code to derive value ...
log local0. "value is $value"
}
when LB_FAILED {
log local0. "in event"
if { [info exists value] } {
log local0. "value = $value"
}
}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
