Forum Discussion
Aaron_Chu_684
Nimbostratus
Jun 15, 2006LB::status not available in HTTP_REQUEST?
I have this iRule where I'm trying to check if a pool member is up before I send traffic to it, but I don't seem to be able to use the "[LB::status pool member up]" command.
This page says that the LB::status command (as written above) is supported in the HTTP_REQUEST event:
http://devcentral.f5.com/Wiki/default.aspx/iRules.LB__status
Here's my code:
when HTTP_REQUEST {
if { ( [HTTP::uri] contains "displayProfile.do" ) or ( [HTTP::uri] contains "displayGallery.do" ) } {
regexp -nocase -line {userid=([0-9]+)(&[=a-z0-9&]+)?$} [HTTP::query] wholeline userid
if { ( $userid ends_with "0" ) or ( $userid ends_with "1" ) } {
if { [LB::status pool www-cache member 10.100.11.60 80 up] } {
node 10.100.11.60 80
}
} elseif { ( $userid ends_with "2" ) or ( $userid ends_with "3" ) } {
node 10.100.11.61 80
} elseif { ( $userid ends_with "4" ) or ( $userid ends_with "5" ) } {
node 10.100.11.62 80
} elseif { ( $userid ends_with "6" ) } {
node 10.100.11.65 80
} elseif { ( $userid ends_with "7" ) } {
node 10.100.11.66 80
} elseif { ( $userid ends_with "8" ) or ( $userid ends_with "9" ) } {
node 10.100.9.21 80
} else {
pool www-cache
}
} else {
pool www
}
}
- Deb_Allen_18Historic F5 AccountIf memory serves, I had some trouble with that command at first as well. This syntax in the example on the wiki page seems to work, though:
(Added a note to that effect to the wiki page.)if { [LB::status pool www-cache member 10.100.11.60 80] eq "up" } {
HTHlog local0. [LB::status pool www-cache member 10.100.11.60 80 up]
- Aaron_Chu_684
Nimbostratus
Thanks for the advice, but it hasn't helped. I've tried the following things:log local0. [LB::status pool www-cache member 10.100.11.60 80]
log local0. [LB::status pool www-cache member 10.100.11.60 80 up]
line 5: [undefined procedure: LB::status] [LB::status pool www-cache member 10.100.11.60 80]
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