Forum Discussion

Subhajit1107_38's avatar
Subhajit1107_38
Icon for Nimbostratus rankNimbostratus
Apr 27, 2019

Find pools ( via iRule) to VS mapping

Hi,

If the pools for a vs is associated via iRule like below, is there a command or script or way to get which pool is associated with what VS

when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
    /wsm-pm* { 
    pool pool_fusion_prod_cat1_wsm
}
    /soa-infra* { 
    pool pool_fusion_prod_cat1_soa
    }
    /inspection.wsil {
            pool pool_fusion_prod_cat1_soa 
    }
/integration { 
    pool pool_fusion_prod_cat1_soa
    }

    ....... }

1 Reply

  • The iRule command

    LB::server name
    Will return the pool name associated with the virtual server processing the request.

    For example, you can set the default pool name assigned to the virtual server in a variable, to be used elsewhere in your iRule.

    when HTTP_REQUEST {
        set poolName [LB::server name]
    }