You're close...
The LB::status section would evaluate a little differently.
Exerpt from
Click here -
http://tech.f5.com/home/bigip-next/manuals/bigip9_2/bigip9_2config/BIG_IP9_2ConfigGuide-14-1.htmlwp1200312
iRule command
LB::status
LB::status node
LB::status pool member
Description
Returns the status of a node. Possible values are
up, down, session_enabled, and
session_disabled. If you supply no arguments, returns the status of the currently-selected node
So you'd have something like:
when LB_FAILED {
if { [LB::status pool member ] eq "down" } {
log "Server $ip $port down!"
}
}
-Colin