Irule trigger applying to all pool members and just want it to apply to pool member with session_disabled

Hi All

I wonder if someone could assist me with an irule that I have put together.

The irule triggers but applies the HTTP:close to all pool members and I just want to send the trigger to the member with the session_disabled state:

when HTTP_RESPONSE { foreach pool_member [members -list [LB::server pool]] { if { [LB::status pool [LB::server pool] member [getfield $pool_member " " 1] [getfield $pool_member " " 2]] equals “session_disabled” } { HTTP::close log local0. “http:close” } } }

Thanks

Have you tried this: DevCentral - An F5 Technical Community

Also, this iRule may provide a framework to achieve something similar but not the exact requirements that you need - something to try out:

when HTTP_RESPONSE { 
        if { [LB::status pool [LB::server pool] member [LB::server addr] [LB::server port]] eq "session_disabled" } { 
            HTTP::close 
            log local0. "HTTP::close"
        } 
}