Forum Discussion
Aldo_Peirano_17
Nimbostratus
Oct 01, 2014Assistance required with irule for airwatch
any help anyone can provide will REALLY be appreciated. We are in the middle of an Airwatch deployment and we have setup our AWCM servers in a load balance behind an F5. We were finding lots of pro...
What_Lies_Bene1
Cirrostratus
Oct 02, 2014OK, this shouldn't be too hard. Any specific reason you want to use CARP? Here's a first attempt;
when HTTP_RESPONSE {
Check the awcmsessionid header exists
if { [HTTP::header exists "awcmsessionid"] } {
If it does, check it has a usable value
if { [HTTP::header value "awcmsessionid"] != "" } {
If it does, use it to create a persistence record
persist add uie [HTTP::header value "awcmsessionid"] 1800
}
else {
log local0. "The awcmsessionid HTTP header was found but is null"
No luck then, will need to rely on request query string if we can
}
else {
log local0. "The awcmsessionid HTTP header was not found"
No luck then, will need to rely on request query string
}
}
}
when HTTP_REQUEST {
Check the awcmsessionid header exists
if { [HTTP::header exists "awcmsessionid"] } {
If it does, check it has a usable value
if { [HTTP::header value "awcmsessionid"] != "" } {
If it does, use it to do a persistence lookup
If you need to select a pool, do so here, before we persist
persist uie [HTTP::header value "awcmsessionid"] 1800
exit here to ensure we don't do two persistence lookups
return
}
else {
log local0. "The awcmsessionid HTTP header was found but is null"
No luck then, will need to rely on request query string
}
}
No header so lets use the HTTP query instead, if we can
Check the right string exists
if { [string tolower [HTTP::query ]] contains "awcmsessionid" } {
The required query string is there, let's get it's value
We'll find awcmsessionid, move one to the right (the =)
and store data to the end of the query in our variable
set querystring [findstr [HTTP::query] "awcmsessionid" "1"]
Lets check its not null
if { $querystring != "" } {
persist uie $querystring 1800
}
else {
log local0. "No header or relevant query string found - can't persist"
}
}
}
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