Michael_Koyfma1
Dec 12, 2007Cirrus
Getting default pool associated with Virtual
There is a way to retrieve the default pool name that is associated with the VS using iRules. Below is an example of how this is done:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
log local0. "default pool is $default_pool"
}
For the longest time, I was under misconception that LB::server pool would not be available until LB_SELECTED or LB_FAILED event, but apparently this is not the case - this iRule works, and can be used as a core generic rule that's applicable to several virtuals - nice little trick.