Forum Discussion

uni's avatar
uni
Icon for Altostratus rankAltostratus
Jan 29, 2010

Testing for the pool name

Is it possible to test what pool is assigned to a virtual? Something along the lines of

if { pool == myPool }

1 Reply

  • Hi Stephen,

    You can use LB::server to get the name of the VIP's default pool:

     
      http://devcentral.f5.com/Wiki/default.aspx/iRules/lb__server 
     when CLIENT_ACCEPTED { 
         Save the name of the VIP's default pool 
        set default_pool [LB::server pool] 
     } 
     

    Aaron