Forum Discussion

trx's avatar
Oct 21, 2011

pool check numeric values

Hello Community,

 

I'm trying to determine what each numeric value means when checking a pool's state.

 

 

 

ex)

 

 

 

3) iRule3->VS3:

 

when HTTP_REQUEST {

 

if { ([active_members pool1] < 1) or ([active_members pool2] < 1) or ([active_members pool3] < 1) } {

 

pool pool6

 

} else {

 

pool pool3

 

}

 

}

 

 

 

 

What does the " < 1 " actually mean? What other numeric values are there and what do they mean?

 

 

 

Thanks in advance.

 

 

 

Regards,

 

TRX

 

 

 

4 Replies

  • Steve_Brown_882's avatar
    Steve_Brown_882
    Historic F5 Account
    The example you show is checking the number of active pool members so <1 would mean all of the pool members are down.
  • Would happen to know what the numbers below mean?

     

     

    1, 2, 3, etc?

     

     

     

    ex) Goal is to check if the pool member specified is flagged down/disabled or NOT

     

     

     

    if { ([pool google-search member 192.168.254.189 80] < 1) } {

     

    pool google-search member 167.3.11.93 7800

     

    return

     

    } else {

     

    pool google-search member 167.3.10.93 7800

     

    return

     

    }

     

     

     

     

    Thanks.

     

     

     

    Regards,

     

    TRX

     

  • If you want to check the status of a node you can use the LB::status command.

    http://devcentral.f5.com/wiki/iRules.LB__status.ashx

    Your iRule would look something like this:

    
    when HTTP_REQUEST {
    log local0. "Node 1 Status:  [LB::status pool my.pool.name member 10.10.10.10 80]"
    log local0. "Node 2 Status:  [LB::status pool my.pool.name member 20.20.20.20 80]"
    if { [LB::status pool my.pool.name member 10.10.10.10 80] eq "down" } {
    HTTP::redirect "http://www.yahoo.com"
    }
    if { [LB::status pool my.pool.name member 20.20.20.20 80] eq "down" } {
    HTTP::redirect "http://www.msn.com"
    }
    }